mirror of
https://github.com/NixOS/nix.git
synced 2024-11-21 22:32:26 +00:00
Fix precompiled headers building with clang
Since 24.05 (I think) we need to pass `-c` or Clang thinks we want to compile *both* a final executable and precompiled header file, and complains that we cannot use `-o` with multiple outputs. `-c` seems fine with GCC too, so I just put it in there conditionally.
This commit is contained in:
parent
b130d2f2e3
commit
e74ce01b7f
@ -8,7 +8,7 @@ GCH = $(buildprefix)precompiled-headers.h.gch
|
||||
$(GCH): precompiled-headers.h
|
||||
@rm -f $@
|
||||
@mkdir -p "$(dir $@)"
|
||||
$(trace-gen) $(CXX) -x c++-header -o $@ $< $(GLOBAL_CXXFLAGS) $(GCH_CXXFLAGS)
|
||||
$(trace-gen) $(CXX) -c -x c++-header -o $@ $< $(GLOBAL_CXXFLAGS) $(GCH_CXXFLAGS)
|
||||
|
||||
clean-files += $(GCH)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user