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

Unified Diff: build/build_nexe.py

Issue 1056363003: Revert of Remove NACL_BUILD_ARCH_MAP (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/build_nexe.py
diff --git a/build/build_nexe.py b/build/build_nexe.py
index 9f24bd23bea847fedbde75c6fc1d95a88461b6cd..47e17f1b75623a3e55a5c0db3f42377c03d625a3 100644
--- a/build/build_nexe.py
+++ b/build/build_nexe.py
@@ -29,6 +29,20 @@
IsFile, MakeDir, RemoveFile)
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import pynacl.platform
+
+
+# When a header file defining NACL_BUILD_SUBARCH is introduced,
+# we can simply remove this map.
+# cf) https://code.google.com/p/chromium/issues/detail?id=440012.
+NACL_BUILD_ARCH_MAP = {
+ 'x86-32': ['NACL_BUILD_ARCH=x86', 'NACL_BUILD_SUBARCH=32'],
+ 'x86-32-nonsfi': ['NACL_BUILD_ARCH=x86', 'NACL_BUILD_SUBARCH=32'],
+ 'x86-64': ['NACL_BUILD_ARCH=x86', 'NACL_BUILD_SUBARCH=64'],
+ 'arm': ['NACL_BUILD_ARCH=arm', 'NACL_BUILD_SUBARCH=32'],
+ 'arm-nonsfi': ['NACL_BUILD_ARCH=arm', 'NACL_BUILD_SUBARCH=32'],
+ 'mips': ['NACL_BUILD_ARCH=mips', 'NACL_BUILD_SUBARCH=32'],
+ 'pnacl': ['NACL_BUILD_ARCH=pnacl'],
+}
def RemoveQuotes(opt):
@@ -337,8 +351,7 @@
'NACL_OSX=0',
'NACL_LINUX=0',
'NACL_ANDROID=0'])
- if arch == 'pnacl':
- define_list.extend(['NACL_BUILD_ARCH=pnacl'])
+ define_list.extend(NACL_BUILD_ARCH_MAP[arch])
options += ['-D' + define for define in define_list]
self.compile_options = options + ['-I' + name for name in self.inc_paths]
« 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