Skip to content

Commit

Permalink
Revert "pkgs/build-support: cc-wrapper.sh not detecting c++ files by …
Browse files Browse the repository at this point in the history
…extension" (#370692)

This change broke Firefox, since it wasi-ld now fails to find its libc.
  • Loading branch information
mweinelt authored Jan 3, 2025
1 parent 328b3c1 commit 75ed7e6
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions pkgs/build-support/cc-wrapper/cc-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ while (( "$n" < "$nParams" )); do
c++*) isCxx=1 ;;
esac
;;
# check common c++ file extensions
# taken from clang: https://github.com/llvm/llvm-project/blob/4d6a5fc702e568b0456c4d8f9e2307eb6d81e955/clang/lib/Driver/Types.cpp#L299-L369
*.C|*.H|*.cc|*.CC|*.cp|*.hh|*.ccm|*.cpp|*.CPP|*.c++|*.C++|*.cxx|*.CXX|*.hpp|*.hxx|*.c++m|*.cppm|*.cxxm) isCxx=1 ;;
--) # Everything else is positional args!
# See: https://github.com/llvm/llvm-project/commit/ed1d07282cc9d8e4c25d585e03e5c8a1b6f63a74

Expand All @@ -68,12 +65,6 @@ while (( "$n" < "$nParams" )); do

positionalArgs=("${params[@]:$n}")
params=("${params[@]:0:$((n - 1))}")

for pa in "${positionalArgs[@]}"; do
case $pa in
*.C|*.H|*.cc|*.CC|*.cp|*.hh|*.ccm|*.cpp|*.CPP|*.c++|*.C++|*.cxx|*.CXX|*.hpp|*.hxx|*.c++m|*.cppm|*.cxxm) isCxx=1 ;;
esac
done
break;
;;
-?*) ;;
Expand Down

0 comments on commit 75ed7e6

Please sign in to comment.