about summary refs log tree commit diff
path: root/pkgs/build-support/cc-wrapper
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2023-04-04 09:25:59 +0200
committerVladimír Čunát <v@cunat.cz>2023-04-04 09:25:59 +0200
commit834334f2c22ddc072c3ead66ffcfc11bccba1319 (patch)
tree51fee151797784b68c074babe3b9224b651b2d9f /pkgs/build-support/cc-wrapper
parentdad2b6f71234450e282a480f7c548dd88d1ed2e0 (diff)
parentb59d61aa489b3ae6a08cfe5b7684068b644d26f1 (diff)
Merge #169327: cc-wrapper: fix minor problems
...into staging
Diffstat (limited to 'pkgs/build-support/cc-wrapper')
-rw-r--r--pkgs/build-support/cc-wrapper/cc-wrapper.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/build-support/cc-wrapper/cc-wrapper.sh b/pkgs/build-support/cc-wrapper/cc-wrapper.sh
index cf9a351f39500..e8eb579e15add 100644
--- a/pkgs/build-support/cc-wrapper/cc-wrapper.sh
+++ b/pkgs/build-support/cc-wrapper/cc-wrapper.sh
@@ -46,6 +46,8 @@ while (( "$n" < "$nParams" )); do
         -nostdinc) cInclude=0 cxxInclude=0 ;;
         -nostdinc++) cxxInclude=0 ;;
         -nostdlib) cxxLibrary=0 ;;
+        -x*-header) dontLink=1 ;; # both `-x c-header` and `-xc-header` are accepted by clang
+        -xc++*) isCxx=1 ;;        # both `-xc++` and `-x c++` are accepted by clang
         -x)
             case "$p2" in
                 *-header) dontLink=1 ;;