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 /bin | |
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 'bin')
-rwxr-xr-x | bin/bootstrap.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/bootstrap.py b/bin/bootstrap.py index e235aa0d..012f0d67 100755 --- a/bin/bootstrap.py +++ b/bin/bootstrap.py @@ -85,6 +85,7 @@ CC="cc" CXX="c++" CFLAGS = [] CXXFLAGS = [] +FINAL_LDFLAGS = ["-Wl,-z,stack-size=8388608"] if "COMPILER_FAMILY" in CONF: if CONF["COMPILER_FAMILY"] == "gnu": @@ -104,6 +105,8 @@ if "ADD_CFLAGS" in CONF: CFLAGS=CONF["ADD_CFLAGS"] if "ADD_CXXFLAGS" in CONF: CXXFLAGS=CONF["ADD_CXXFLAGS"] +if "FINAL_LDFLAGS" in CONF: + FINAL_LDFLAGS+=CONF["FINAL_LDFLAGS"] BOOTSTRAP_CC = [CXX] + CXXFLAGS + ["-std=c++20", "-DBOOTSTRAP_BUILD_TOOL"] @@ -371,8 +374,8 @@ def bootstrap(): cmd = BOOTSTRAP_CC + flags + ["-c", f, "-o", obj_file_name] ts.submit(run, cmd, cwd=src_wrkdir) bootstrap_just = os.path.join(WRKDIR, "bootstrap-just") - cmd = BOOTSTRAP_CC + ["-o", bootstrap_just - ] + object_files + dep_flags["link"] + cmd = BOOTSTRAP_CC + FINAL_LDFLAGS + ["-o", bootstrap_just + ] + object_files + dep_flags["link"] run(cmd, cwd=src_wrkdir) CONF_FILE = os.path.join(WRKDIR, "repo-conf.json") LOCAL_ROOT = os.path.join(WRKDIR, ".just") |