Move -fPIC into YOGA_DEFS

Summary:
Move -fPIC from BUCK to YOGA_DEFS, so that it can be overridden when
building yoga inside another build tree (since the larger build tree
may need its own configuration for -fPIC). No change when building yoga
standalone.

Reviewed By: emilsjolander

Differential Revision: D4714782

fbshipit-source-id: c706336cda72b36045e744e4fcaea4c0899bcf38
This commit is contained in:
Shoaib Meenai
2017-03-17 10:49:59 -07:00
committed by Facebook Github Bot
parent a14aeb27bb
commit 62a74a5ef9
2 changed files with 5 additions and 2 deletions

3
BUCK
View File

@@ -12,9 +12,8 @@ GMOCK_OVERRIDE_FLAGS = [
"-Wno-inconsistent-missing-override",
]
COMPILER_FLAGS = BASE_COMPILER_FLAGS + [
COMPILER_FLAGS = LIBRARY_COMPILER_FLAGS + [
"-std=c11",
"-fPIC",
]
TEST_COMPILER_FLAGS = BASE_COMPILER_FLAGS + GMOCK_OVERRIDE_FLAGS + ["-std=c++11"]

View File

@@ -33,6 +33,10 @@ BASE_COMPILER_FLAGS = [
'-O3',
]
LIBRARY_COMPILER_FLAGS = BASE_COMPILER_FLAGS + [
'-fPIC',
]
def yoga_dep(dep):
return '//' + dep