diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-10-22 12:53:34 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-10-22 15:15:34 +0200 |
commit | d8bacc4b946a3fb523e9c2b683842bce99e000e6 (patch) | |
tree | ed207bbb0744a6a84f43e5dd7df6c81f23a20d61 | |
parent | 121e8622ab717dc26a8dd50cd2f653af9d09037a (diff) | |
download | justbuild-d8bacc4b946a3fb523e9c2b683842bce99e000e6.tar.gz |
clang toolchain: add -fdebug-compilation-dir=. in debug mode
... to allow reproducible debug builds. Unfortunately, gcc does not support
such an option.
-rw-r--r-- | etc/toolchain/CC/TARGETS | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/toolchain/CC/TARGETS b/etc/toolchain/CC/TARGETS index 06036918..2f2b58e6 100644 --- a/etc/toolchain/CC/TARGETS +++ b/etc/toolchain/CC/TARGETS @@ -168,7 +168,7 @@ } , "clang": { "type": ["CC", "defaults"] - , "arguments_config": ["OS", "ARCH", "TARGET_ARCH"] + , "arguments_config": ["OS", "ARCH", "TARGET_ARCH", "DEBUG"] , "CC": ["clang"] , "CXX": ["clang++"] , "AR": @@ -271,6 +271,11 @@ } } } + , "ADD_COMPILE_FLAGS": + { "type": "if" + , "cond": {"type": "var", "name": "DEBUG"} + , "then": ["-fdebug-compilation-dir=."] + } , "PATH": ["/bin", "/sbin", "/usr/bin", "/usr/sbin"] } } |