From c02e04291807cf97228068cc5b52f453d84ab37b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Mon, 13 Mar 2017 21:00:39 -0400 Subject: [PATCH] nitc: let CC, CXX and NO_STACKTRACE use env value MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- src/compiler/abstract_compiler.nit | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 -- 1.7.9.5