diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2023-05-31 14:29:22 +0200 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2023-05-31 18:13:43 +0200 |
commit | 9e45d1525b0fde12a08f7c376b5bf2c7bfbc9803 (patch) | |
tree | 2d0fd5e44999e7242fc22efaae1d8d25eb5ec59a /src | |
parent | ea4ebc8b7eda78d993d67f5fffbcf2eb19690899 (diff) | |
download | justbuild-9e45d1525b0fde12a08f7c376b5bf2c7bfbc9803.tar.gz |
Support FINAL_LDFLAGS variable for binaries
... and set default stack size to 8 MB.
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtool/main/TARGETS | 14 | ||||
-rw-r--r-- | src/other_tools/just_mr/TARGETS | 14 |
2 files changed, 20 insertions, 8 deletions
diff --git a/src/buildtool/main/TARGETS b/src/buildtool/main/TARGETS index 68197a89..52a92521 100644 --- a/src/buildtool/main/TARGETS +++ b/src/buildtool/main/TARGETS @@ -1,6 +1,6 @@ { "just": { "type": ["@", "rules", "CC", "binary"] - , "arguments_config": ["BUILD_STATIC_BINARY"] + , "arguments_config": ["BUILD_STATIC_BINARY", "FINAL_LDFLAGS"] , "name": ["just"] , "srcs": ["main.cpp"] , "private-deps": @@ -31,9 +31,15 @@ ] , "stage": ["src", "buildtool", "main"] , "private-ldflags": - { "type": "if" - , "cond": {"type": "var", "name": "BUILD_STATIC_BINARY"} - , "then": ["-static"] + { "type": "++" + , "$1": + [ ["-Wl,-z,stack-size=8388608"] + , { "type": "if" + , "cond": {"type": "var", "name": "BUILD_STATIC_BINARY"} + , "then": ["-static"] + } + , {"type": "var", "name": "FINAL_LDFLAGS", "default": []} + ] } } , "describe": diff --git a/src/other_tools/just_mr/TARGETS b/src/other_tools/just_mr/TARGETS index 85b86f53..02876feb 100644 --- a/src/other_tools/just_mr/TARGETS +++ b/src/other_tools/just_mr/TARGETS @@ -1,6 +1,6 @@ { "just-mr": { "type": ["@", "rules", "CC", "binary"] - , "arguments_config": ["BUILD_STATIC_BINARY"] + , "arguments_config": ["BUILD_STATIC_BINARY", "FINAL_LDFLAGS"] , "name": ["just-mr"] , "srcs": ["main.cpp"] , "private-deps": @@ -22,9 +22,15 @@ ] , "stage": ["src", "other_tools", "just_mr"] , "private-ldflags": - { "type": "if" - , "cond": {"type": "var", "name": "BUILD_STATIC_BINARY"} - , "then": ["-static"] + { "type": "++" + , "$1": + [ ["-Wl,-z,stack-size=8388608"] + , { "type": "if" + , "cond": {"type": "var", "name": "BUILD_STATIC_BINARY"} + , "then": ["-static"] + } + , {"type": "var", "name": "FINAL_LDFLAGS", "default": []} + ] } } , "utils": |