fix CAFFE2_BUILD_MAIN_LIB to the correct C10_BUILD_MAIN_LIB (#70848)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/70848

This is the C10 library, it that's the main lib we are building
here. While here, use `local_defines` instead of `copts` for this
definition. Both `copts` and `local_defines` only apply to the
compilation units in the library, and not transitively.
ghstack-source-id: 146998039

Test Plan: We are relying on CI to verify this doesn't cause any problems.

Reviewed By: malfet

Differential Revision: D33429420

fbshipit-source-id: b3fc84c0588bd43346e3f9f77e851d293bde9428
This commit is contained in:
Michael Dagitses
2022-01-18 08:03:06 -08:00
committed by Facebook GitHub Bot
parent fd9e08df5d
commit 8d0e354191

View File

@ -56,7 +56,7 @@ cc_library(
]),
[],
),
copts = ["-DCAFFE2_BUILD_MAIN_LIB"],
local_defines = ["C10_BUILD_MAIN_LIB"],
deps = [
":headers",
"@fmt",