From d8bacc4b946a3fb523e9c2b683842bce99e000e6 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 22 Oct 2024 12:53:34 +0200 Subject: clang toolchain: add -fdebug-compilation-dir=. in debug mode ... to allow reproducible debug builds. Unfortunately, gcc does not support such an option. --- etc/toolchain/CC/TARGETS | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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"] } } -- cgit v1.2.3