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

Side by Side Diff: build/SConscript.main

Issue 57077: Print out some warnings on unsupported build flags. (Closed)
Patch Set: Created 11 years, 8 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 import shutil 6 import shutil
7 import sys 7 import sys
8 8
9 9
10 if sys.platform == 'win32': 10 if sys.platform == 'win32':
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 PERL = 'perl', 149 PERL = 'perl',
150 PERL_INCLUDE_FLAG = '-I ', 150 PERL_INCLUDE_FLAG = '-I ',
151 PERL_INCLUDE_SUFFIX = '', 151 PERL_INCLUDE_SUFFIX = '',
152 _PERL_INCLUDE_FLAGS = ('${_concat(PERL_INCLUDE_FLAG, ' 152 _PERL_INCLUDE_FLAGS = ('${_concat(PERL_INCLUDE_FLAG, '
153 'PERL_INCLUDE_PATH, ' 153 'PERL_INCLUDE_PATH, '
154 'PERL_INCLUDE_SUFFIX,' 154 'PERL_INCLUDE_SUFFIX,'
155 '__env__, RDirs, TARGET, SOURCE)}'), 155 '__env__, RDirs, TARGET, SOURCE)}'),
156 ) 156 )
157 157
158 root_env['req_system_libs'] = ARGUMENTS.get('SYSTEM_LIBS', '').split(',') 158 root_env['req_system_libs'] = []
159 if 'SYSTEM_LIBS' in ARGUMENTS:
160 root_env['req_system_libs'] = ARGUMENTS['SYSTEM_LIBS'].split(',')
161 print "WARNING: Using system libs is not yet supported and may fail."
162 print "WARNING: You should only use this flag if you're willing to diagnose"
163 print "WARNING: and fix the inevitable link failures."
164
159 root_env['_GYP'] = ARGUMENTS.get('GYP') and '_gyp' or '' 165 root_env['_GYP'] = ARGUMENTS.get('GYP') and '_gyp' or ''
160 166
161 def WantSystemLib(env, lib): 167 def WantSystemLib(env, lib):
162 """ 168 """
163 Return true if lib has been requested as a system library in SYSTEM_LIBS. 169 Return true if lib has been requested as a system library in SYSTEM_LIBS.
164 """ 170 """
165 if lib not in env['all_system_libs']: 171 if lib not in env['all_system_libs']:
166 env['all_system_libs'].append(lib) 172 env['all_system_libs'].append(lib)
167 return (lib in env['req_system_libs']) 173 return (lib in env['req_system_libs'])
168 root_env.AddMethod(WantSystemLib, "WantSystemLib") 174 root_env.AddMethod(WantSystemLib, "WantSystemLib")
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 if ARGUMENTS.get('PROFILE') == '1': 588 if ARGUMENTS.get('PROFILE') == '1':
583 linux_env.Append(CCFLAGS=['-pg', '-g']) 589 linux_env.Append(CCFLAGS=['-pg', '-g'])
584 linux_env.Append(LINKFLAGS=['-pg']) 590 linux_env.Append(LINKFLAGS=['-pg'])
585 591
586 # Build with symbols (useful for opt builds, for example) when SYMBOLS=1. 592 # Build with symbols (useful for opt builds, for example) when SYMBOLS=1.
587 if ARGUMENTS.get('SYMBOLS') == '1': 593 if ARGUMENTS.get('SYMBOLS') == '1':
588 linux_env.Append(CCFLAGS=['-g']) 594 linux_env.Append(CCFLAGS=['-g'])
589 595
590 # Build shared libraries (useful for fast links) when SHARED=1. 596 # Build shared libraries (useful for fast links) when SHARED=1.
591 if ARGUMENTS.get('SHARED') == '1': 597 if ARGUMENTS.get('SHARED') == '1':
598 print "WARNING: The shared link frequently breaks and is unlikely to work."
599 print "WARNING: You should only use this flag if you're willing to diagnose"
600 print "WARNING: and fix the inevitable link failures."
592 linux_env.Replace(COMPONENT_STATIC=False) 601 linux_env.Replace(COMPONENT_STATIC=False)
593 602
594 # Build with system-provided NSS and GTK. 603 # Build with system-provided NSS and GTK.
595 if root_env['PLATFORM'] in ['linux', 'linux2', 'posix']: 604 if root_env['PLATFORM'] in ['linux', 'linux2', 'posix']:
596 try: 605 try:
597 linux_env.ParseConfig('pkg-config --cflags --libs nss') 606 linux_env.ParseConfig('pkg-config --cflags --libs nss')
598 linux_env.ParseConfig('pkg-config --cflags --libs gtk+-2.0') 607 linux_env.ParseConfig('pkg-config --cflags --libs gtk+-2.0')
599 linux_env.ParseConfig('pkg-config --cflags --libs pangoft2') 608 linux_env.ParseConfig('pkg-config --cflags --libs pangoft2')
600 except OSError, e: 609 except OSError, e:
601 print ('\n' 610 print ('\n'
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 'all_libraries', 900 'all_libraries',
892 'all_languages', 901 'all_languages',
893 'all_programs', 902 'all_programs',
894 'all_test_programs', 903 'all_test_programs',
895 ], projects = [p], 904 ], projects = [p],
896 COMPONENT_VS_PROJECT_SCRIPT_PATH=( 905 COMPONENT_VS_PROJECT_SCRIPT_PATH=(
897 'cd $$(ProjectDir)/$VS_PROJECT_TO_MAIN_DIR && hammer.bat'), 906 'cd $$(ProjectDir)/$VS_PROJECT_TO_MAIN_DIR && hammer.bat'),
898 ) 907 )
899 908
900 # ------------------------------------------------------------------------- 909 # -------------------------------------------------------------------------
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698