This commit is contained in:
vczh
2024-01-06 00:42:26 -08:00
parent bf320ae131
commit ac4f5a2dc3

View File

@@ -0,0 +1,20 @@
COVERAGE?=NO
USE_GCC?=NO
# add "--stdlib=libc++" after bug #808086 is fixed
ifeq ($(USE_GCC), YES)
CPP_LINK=g++ -std=c++20 -g -pthread $(CPP_LINK_OPTIONS) -o $@ $^
else ifeq ($(COVERAGE),NO)
CPP_LINK=clang++ -std=c++20 -pthread -g $(CPP_COMPILE_OPTIONS) -o $@ $^
else
CPP_LINK=clang++ -std=c++20 -pthread -g --coverage $(CPP_LINK_OPTIONS) -o $@ $^
endif
ifeq ($(USE_GCC), YES)
CPP_COMPILE=g++ -std=c++20 -g $(CPP_COMPILE_OPTIONS) -o $@ -c $<
else ifeq ($(COVERAGE),NO)
CPP_COMPILE=clang++ -std=c++20 -g $(CPP_COMPILE_OPTIONS) -o $@ -c $<
else
CPP_COMPILE=clang++ -std=c++20 -g -fprofile-arcs -ftest-coverage $(CPP_COMPILE_OPTIONS) -o $@ -c $<
endif