From 9c1796029f237dc1c7d19fb867d9413e8372ad42 Mon Sep 17 00:00:00 2001 From: whh8b <whh8b@git.zephyr-software.com> Date: Tue, 5 Jan 2016 20:21:27 +0000 Subject: [PATCH] Update build parameters 1. Add a profile flag for cases when user wants to compile zipr with the ability to generate profiles during its execution. 2. Update the -std flag so that we can compile on DECREE VMs. --- SConstruct | 10 ++++++++-- test/SConscript | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/SConstruct b/SConstruct index ff3f7e3fe..2fedae36f 100644 --- a/SConstruct +++ b/SConstruct @@ -8,7 +8,7 @@ env=Environment() # default build options env.Replace(CFLAGS=" -fPIC ") -env.Replace(CXXFLAGS=" -std=c++11 -fPIC ") +env.Replace(CXXFLAGS=" -std=c++0x -fPIC ") env.Replace(LINKFLAGS=" -fPIC ") # parse arguments @@ -16,11 +16,17 @@ env.Replace(SECURITY_TRANSFORMS_HOME=os.environ['SECURITY_TRANSFORMS_HOME']) env.Replace(ZIPR_HOME=os.environ['ZIPR_HOME']) env.Replace(ZIPR_INSTALL=os.environ['ZIPR_INSTALL']) env.Replace(ZIPR_SDK=os.environ['ZIPR_SDK']) +env.Replace(profile=ARGUMENTS.get("profile",0)) env.Replace(debug=ARGUMENTS.get("debug",0)) env.Replace(do_cgc=ARGUMENTS.get("do_cgc",0)) env.Replace(do_64bit_build=ARGUMENTS.get("do_64bit_build",0)) - +if int(env['profile']) == 1: + print "Setting profile and debug mode" + env.Append(CFLAGS=" -pg") + env.Append(CXXFLAGS=" -pg") + env.Append(LINKFLAGS=" -pg") + env['debug'] = 1 if int(env['debug']) == 1: print "Setting debug mode" env.Append(CFLAGS=" -g") diff --git a/test/SConscript b/test/SConscript index daf96ce13..5570714ef 100644 --- a/test/SConscript +++ b/test/SConscript @@ -62,7 +62,7 @@ libpath=''' ''' myenv.Append(CCFLAGS=" -Wall ") -myenv.Append(CXXFLAGS=" -pg -std=c++11 -g -O0 ") +myenv.Append(CXXFLAGS=" -pg -std=c++0x -g -O0 ") #myenv.Append(CXXFLAGS=" -pg -g -O0 ") myenv.Append(LINKFLAGS=" -pg -Wl,-E ") # export all symbols -- GitLab