Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: build/SConscript.main

Issue 10857: Add OPT=1 flag to build optimized on Linux. (Closed)
Patch Set: alles ist gut Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/SConscript.v8 » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/SConscript.main
diff --git a/build/SConscript.main b/build/SConscript.main
index 60e86a95e17b7f3c01343b7d77275f5d126ed82b..25d5e3a91ff8ceb6e3c70df1b4595b616c858b21 100644
--- a/build/SConscript.main
+++ b/build/SConscript.main
@@ -37,13 +37,12 @@ root_env = Environment(
CHROME_SRC_DIR = '$MAIN_DIR/..',
DESTINATION_ROOT = '$MAIN_DIR/Hammer',
- TARGET_ROOT = '$DESTINATION_ROOT',
# Where ComponentTestProgram() will build test executables.
- TESTS_DIR = '$TARGET_ROOT',
+ TESTS_DIR = '$DESTINATION_ROOT',
# Where ComponentProgram() will build program executables.
- STAGING_DIR = '$TARGET_ROOT',
+ STAGING_DIR = '$DESTINATION_ROOT',
# Where ComponentLibrary() will build libraries.
LIBS_DIR = '$COMPONENT_LIBRARY_DIR',
@@ -441,16 +440,8 @@ windows_env.AppendENVPath('PATH', ';C:\\WINDOWS\\system32')
# Linux specific
linux_env = root_env.Clone()
-environment_list.append(linux_env)
linux_env.Tool('target_platform_linux')
-linux_env.Tool('target_debug')
linux_env.Tool('yacc')
-linux_env.Replace(
- BUILD_TYPE = 'debug-linux',
- BUILD_TYPE_DESCRIPTION = 'Linux debug build',
-)
-linux_env.Append(BUILD_GROUPS = ['default'])
-
# TODO(bradnelson): this is needed for now because target_platform_linux has
# OS_LINUX defined in a weird way.
@@ -566,6 +557,25 @@ if root_env['PLATFORM'] in ['linux', 'linux2', 'posix']:
'libxslt requested in SYSTEM_LIBS but not found\n')
sys.exit(1)
+linux_dbg = linux_env.Clone()
+environment_list.append(linux_dbg)
+linux_dbg.Replace(
+ BUILD_TYPE = 'dbg',
+ BUILD_TYPE_DESCRIPTION = 'Linux debug build',
+)
+linux_dbg.Tool('target_debug')
+linux_dbg.Append(BUILD_GROUPS = ['default'])
+
+linux_opt = linux_env.Clone()
+environment_list.append(linux_opt)
+# Disable rpath for faster startup.
+linux_opt.Append(RPATH = [])
+linux_opt.Replace(
+ BUILD_TYPE = 'opt',
+ BUILD_TYPE_DESCRIPTION = 'Linux optimized build',
+)
+linux_opt.Tool('target_optimized')
+
# --------------------------------------------------------------------------
# Mac specific
« no previous file with comments | « no previous file | build/SConscript.v8 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698