1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 06:53:54 +02:00

Revert "Merge pull request #11804 from obsidiansystems/remove-old-make"

This reverts commit 619eeb658a, reversing
changes made to 1af94bf471.
This commit is contained in:
Eelco Dolstra 2024-11-07 13:46:37 +01:00
parent 3ab8534b13
commit 67d231c046
134 changed files with 4722 additions and 75 deletions

21
mk/precompiled-headers.mk Normal file
View file

@ -0,0 +1,21 @@
PRECOMPILE_HEADERS ?= 0
print-var-help += \
echo " PRECOMPILE_HEADERS ($(PRECOMPILE_HEADERS)): Whether to use precompiled headers to speed up the build";
GCH = $(buildprefix)precompiled-headers.h.gch
$(GCH): precompiled-headers.h
@rm -f $@
@mkdir -p "$(dir $@)"
$(trace-gen) $(CXX) -c -x c++-header -o $@ $< $(GLOBAL_CXXFLAGS) $(GCH_CXXFLAGS)
clean-files += $(GCH)
ifeq ($(PRECOMPILE_HEADERS), 1)
GLOBAL_CXXFLAGS_PCH += -include $(buildprefix)precompiled-headers.h -Winvalid-pch
GLOBAL_ORDER_AFTER += $(GCH)
endif