aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/buildfile7
-rw-r--r--libbuild2/c/buildfile7
-rw-r--r--libbuild2/cxx/buildfile7
3 files changed, 4 insertions, 17 deletions
diff --git a/libbuild2/buildfile b/libbuild2/buildfile
index 8d40c28..feabdab 100644
--- a/libbuild2/buildfile
+++ b/libbuild2/buildfile
@@ -77,7 +77,7 @@ objs{*}: cxx.poptions += -DLIBBUILD2_SHARED_BUILD
# used as the build system import path (unless cross-compiling and not
# forgetting to escape backslashes on Windows).
#
-obj{context}: cxx.poptions += "-DBUILD2_HOST_TRIPLET=\"$cxx.target\""
+{obja objs}{context}: cxx.poptions += "-DBUILD2_HOST_TRIPLET=\"$cxx.target\""
# Note that we used to compare complete target triplets but that proved too
# strict. For example, we may be running on x86_64-apple-darwin17.7.0 while
@@ -87,12 +87,9 @@ cross = ($cxx.target.cpu != $build.host.cpu || \
$cxx.target.system != $build.host.system)
if! $cross
- obj{context}: cxx.poptions += \
+ {obja objs}{context}: cxx.poptions += \
-DBUILD2_IMPORT_PATH=\"$regex.replace($out_root, '\\', '\\\\')\"
-obja{context}: cxx.poptions += -DLIBBUILD2_STATIC_BUILD
-objs{context}: cxx.poptions += -DLIBBUILD2_SHARED_BUILD
-
if ($cxx.target.class != 'windows')
{
cxx.libs += -lpthread
diff --git a/libbuild2/c/buildfile b/libbuild2/c/buildfile
index 39a5d7a..234a0d7 100644
--- a/libbuild2/c/buildfile
+++ b/libbuild2/c/buildfile
@@ -45,14 +45,9 @@ cross = ($cxx.target.cpu != $build.host.cpu || \
# Windows). It is used as defaults for BUILD2_DEFAULT_C.
#
if! $cross
-{
- obj{init}: cxx.poptions += \
+ {obja objs}{init}: cxx.poptions += \
-DBUILD2_NATIVE_C=\"$regex.replace($recall($c.path), '\\', '\\\\')\"
- obja{init}: cxx.poptions += -DLIBBUILD2_C_STATIC_BUILD
- objs{init}: cxx.poptions += -DLIBBUILD2_C_SHARED_BUILD
-}
-
# Export options.
#
lib{build2-c}:
diff --git a/libbuild2/cxx/buildfile b/libbuild2/cxx/buildfile
index debb574..f7bd126 100644
--- a/libbuild2/cxx/buildfile
+++ b/libbuild2/cxx/buildfile
@@ -45,14 +45,9 @@ cross = ($cxx.target.cpu != $build.host.cpu || \
# Windows). It is used as defaults for BUILD2_DEFAULT_CXX.
#
if! $cross
-{
- obj{init}: cxx.poptions += \
+ {obja objs}{init}: cxx.poptions += \
-DBUILD2_NATIVE_CXX=\"$regex.replace($recall($cxx.path), '\\', '\\\\')\"
- obja{init}: cxx.poptions += -DLIBBUILD2_CXX_STATIC_BUILD
- objs{init}: cxx.poptions += -DLIBBUILD2_CXX_SHARED_BUILD
-}
-
# Export options.
#
lib{build2-cxx}: