From: Alexis Laferrière Date: Tue, 14 Mar 2017 01:00:39 +0000 (-0400) Subject: nitc: let CC, CXX and NO_STACKTRACE use env value X-Git-Url: http://nitlanguage.org nitc: let CC, CXX and NO_STACKTRACE use env value Signed-off-by: Alexis Laferrière --- diff --git a/src/compiler/abstract_compiler.nit b/src/compiler/abstract_compiler.nit index 224de8b..35c07d5 100644 --- a/src/compiler/abstract_compiler.nit +++ b/src/compiler/abstract_compiler.nit @@ -350,9 +350,9 @@ class MakefileToolchain var debug = toolcontext.opt_debug.value makefile.write """ -CC = ccache cc -CXX = ccache c++ -CFLAGS = -g {{{if not debug then "-O2" else ""}}} -Wno-unused-value -Wno-switch -Wno-attributes -Wno-trigraphs +CC ?= ccache cc +CXX ?= ccache c++ +CFLAGS ?= -g {{{if not debug then "-O2" else ""}}} -Wno-unused-value -Wno-switch -Wno-attributes -Wno-trigraphs CINCL = LDFLAGS ?= LDLIBS ?= -lm {{{linker_options.join(" ")}}} @@ -361,9 +361,9 @@ LDLIBS ?= -lm {{{linker_options.join(" ")}}} makefile.write "\n# SPECIAL CONFIGURATION FLAGS\n" if platform.supports_libunwind then if toolcontext.opt_no_stacktrace.value then - makefile.write "NO_STACKTRACE=True" + makefile.write "NO_STACKTRACE ?= True" else - makefile.write "NO_STACKTRACE= # Set to `True` to enable" + makefile.write "NO_STACKTRACE ?= # Set to `True` to enable" end end