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

Unified Diff: SConstruct

Issue 12459004: Adjust pnacl-translate sbtc flag override mechanism to append. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: do cpu check Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pnacl/driver/driver_tools.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: SConstruct
diff --git a/SConstruct b/SConstruct
index e54bba58b1cb06f01872e62f78558a87de0ada5b..326906bc2be424432da33017300dcb0c39284820 100755
--- a/SConstruct
+++ b/SConstruct
@@ -1107,9 +1107,10 @@ AVAILABLE_PLATFORMS = {
}
# Look up the platform name from the command line arguments.
-def GetPlatform():
+def GetPlatform(self):
return ARGUMENTS.get('platform', 'x86-32')
+pre_base_env.AddMethod(GetPlatform)
# Decode platform into list [ ARCHITECTURE , EXEC_MODE ].
def DecodePlatform(platform):
@@ -1152,7 +1153,7 @@ DeclareBit('target_arm', 'Tools being built will process arm binaries')
def MakeArchSpecificEnv():
env = pre_base_env.Clone()
- platform = GetPlatform()
+ platform = env.GetPlatform()
info = DecodePlatform(platform)
env.Replace(BUILD_FULLARCH=platform)
@@ -1179,7 +1180,7 @@ def MakeArchSpecificEnv():
if env.Bit('target_arm_arm') or env.Bit('target_arm_thumb2'):
env.SetBits('target_arm')
- env.Replace(BUILD_ISA_NAME=GetPlatform())
+ env.Replace(BUILD_ISA_NAME=env.GetPlatform())
if env.Bit('target_arm') or env.Bit('target_mips32'):
if not env.Bit('native_code'):
@@ -2733,7 +2734,7 @@ def MakeLinuxEnv():
elif linux_env.Bit('build_mips32'):
SetupLinuxEnvMips(linux_env)
else:
- Banner('Strange platform: %s' % GetPlatform())
+ Banner('Strange platform: %s' % env.GetPlatform())
# These are desireable options for every Linux platform:
# _FORTIFY_SOURCE: general paranoia "hardening" option for library functions
@@ -3491,7 +3492,7 @@ def AddImplicitLibs(env):
'crti.o',
'crtn.o']
# TODO(mcgrathr): multilib nonsense defeats -B! figure out a better way.
- if GetPlatform() == 'x86-32':
+ if env.GetPlatform() == 'x86-32':
implicit_libs.append(os.path.join('32', 'crt1.o'))
if implicit_libs != []:
« no previous file with comments | « no previous file | pnacl/driver/driver_tools.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698