From 317e0228a80846a793c95bf0f855acb5700a77b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Wed, 15 Jan 2020 17:23:17 -0800 Subject: [PATCH] configure: Put user flags after the mode flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is sometimes convenient to build with flags that don't match any existing mode. Recently I was tracking a bug that would not reproduce with debug, but reproduced with dev, so I tried debugging the result of ./configure.py --cflags="-O0 -g" While the binary had debug info, it still had optimizations because configure.py put the mode flags after the user flags (-O0 -O1). This patch flips the order (-O1 -O0) so that the flags passed in the command line win. Signed-off-by: Rafael Ávila de Espíndola Message-Id: <20200116012318.361732-1-espindola@scylladb.com> --- configure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.py b/configure.py index c5499c7ed4..926903b2f3 100755 --- a/configure.py +++ b/configure.py @@ -1333,7 +1333,7 @@ with open(buildfile_tmp, 'w') as f: libs_{mode} = -l{fmt_lib} seastar_libs_{mode} = {seastar_libs} rule cxx.{mode} - command = $cxx -MD -MT $out -MF $out.d {seastar_cflags} $cxxflags $cxxflags_{mode} $obj_cxxflags -c -o $out $in + command = $cxx -MD -MT $out -MF $out.d {seastar_cflags} $cxxflags_{mode} $cxxflags $obj_cxxflags -c -o $out $in description = CXX $out depfile = $out.d rule link.{mode}