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

Unified Diff: native_client_sdk/src/tools/nacl_config.py

Issue 137853013: [NaCl SDK] Fix the AppEngine lua build after r243629. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 11 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 | native_client_sdk/src/tools/tests/nacl_config_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/tools/nacl_config.py
diff --git a/native_client_sdk/src/tools/nacl_config.py b/native_client_sdk/src/tools/nacl_config.py
index c09ef13add3413d4ee64f99963b271f9034285ad..b508cbaaabc11945a2916df7867196b64ee26d18 100755
--- a/native_client_sdk/src/tools/nacl_config.py
+++ b/native_client_sdk/src/tools/nacl_config.py
@@ -22,6 +22,7 @@ if sys.version_info < (2, 6, 0):
VALID_ARCHES = ('arm', 'x86_32', 'x86_64', 'i686')
+VALID_PNACL_ARCHES = (None, 'pnacl')
ARCH_NAME = {
'arm': 'arm',
'x86_32': 'i686',
@@ -91,7 +92,7 @@ def ExpectToolchain(toolchain, expected_toolchains):
def ExpectArch(arch, expected_arches):
Expect(arch in expected_arches,
'Expected arch to be one of [%s], not %s.' % (
- ', '.join(expected_arches), arch))
+ ', '.join(map(str, expected_arches)), arch))
def CheckValidToolchainArch(toolchain, arch, arch_required=False):
@@ -103,7 +104,7 @@ def CheckValidToolchainArch(toolchain, arch, arch_required=False):
'Expected no arch for host toolchain %r. Got %r.' % (
toolchain, arch))
elif toolchain == 'pnacl':
- Expect(arch is None,
+ Expect(arch is None or arch == 'pnacl',
'Expected no arch for toolchain %r. Got %r.' % (toolchain, arch))
elif arch_required:
Expect(arch is not None,
@@ -112,7 +113,11 @@ def CheckValidToolchainArch(toolchain, arch, arch_required=False):
', '.join(VALID_ARCHES), toolchain))
if arch:
- ExpectArch(arch, VALID_ARCHES)
+ if toolchain == 'pnacl':
+ ExpectArch(arch, VALID_PNACL_ARCHES)
+ else:
+ ExpectArch(arch, VALID_ARCHES)
+
if arch == 'arm':
Expect(toolchain == 'newlib', 'The arm arch only supports newlib.')
@@ -148,7 +153,6 @@ def GetToolchainDir(toolchain, arch=None):
root = GetPosixSDKPath()
platform = getos.GetPlatform()
if toolchain == 'pnacl':
- assert arch is None
subdir = '%s_pnacl' % platform
else:
assert arch is not None
« no previous file with comments | « no previous file | native_client_sdk/src/tools/tests/nacl_config_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698