From 4b62457ce47d80f6266ededa7ef93f508523cacb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eloy=20Dur=C3=A1n?= Date: Fri, 17 Oct 2014 11:12:26 +0200 Subject: [PATCH] [Vendor] Allow the user to override default cflags. --- lib/motion/project/vendor.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/motion/project/vendor.rb b/lib/motion/project/vendor.rb index accea6a9..138655d3 100644 --- a/lib/motion/project/vendor.rb +++ b/lib/motion/project/vendor.rb @@ -120,7 +120,9 @@ EOS App.info 'Compile', File.join(@path, srcfile) FileUtils.mkdir_p File.dirname(objfile) - sh "#{compiler} #{cflags} #{@config.cflags(platform, cplusplus)} -I. -include \"#{pch}\" -c \"#{srcfile}\" -o \"#{objfile}\"" + # Always append the user's clfags *after* ours, so that the user gets a + # chance to override settings that we set. E.g. `-fno-modules`. + sh "#{compiler} #{@config.cflags(platform, cplusplus)} #{cflags} -I. -include \"#{pch}\" -c \"#{srcfile}\" -o \"#{objfile}\"" end if File.exist?(build_dir)