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

Side by Side Diff: pnacl/driver/pnacl-as.py

Issue 8826003: Modify ARM .S code so it can be processed by both gnu-as and llvm-mc. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 # 5 #
6 # IMPORTANT NOTE: If you make local mods to this file, you must run: 6 # IMPORTANT NOTE: If you make local mods to this file, you must run:
7 # % tools/llvm/utman.sh driver 7 # % tools/llvm/utman.sh driver
8 # in order for them to take effect in the scons build. This command 8 # in order for them to take effect in the scons build. This command
9 # updates the copy in the toolchain/ tree. 9 # updates the copy in the toolchain/ tree.
10 # 10 #
11 11
12 import driver_tools 12 import driver_tools
13 13
14 env = driver_tools.env 14 env = driver_tools.env
15 15
16 EXTRA_ENV = { 16 EXTRA_ENV = {
17 'INPUTS' : '', 17 'INPUTS' : '',
18 'OUTPUT' : '', 18 'OUTPUT' : '',
19 19
20 # Options 20 # Options
21 'DIAGNOSTIC' : '0', 21 'DIAGNOSTIC' : '0',
22 'ASPP_FLAGS': '-DNACL_LINUX=1', 22 'ASPP_FLAGS': '-DNACL_LINUX=1',
23 23
24 'AS_FLAGS_ARM' : '-mfpu=vfp -march=armv7-a', 24 'AS_FLAGS_ARM' : '-mfpu=vfp -march=armv7-a',
25 # BUG: http://code.google.com/p/nativeclient/issues/detail?id=1968
25 # once we can use llvm's ARM assembler we should use these flags 26 # once we can use llvm's ARM assembler we should use these flags
26 #'AS_FLAGS_ARM' : '-assemble -filetype=obj -arch=arm -triple=armv7a-nacl', 27 #'AS_FLAGS_ARM' : '-assemble -filetype=obj -arch=arm -triple=armv7a-nacl',
27 'AS_FLAGS_X8632' : '-assemble -filetype=obj -arch=x86 -triple=i686-nacl', 28 'AS_FLAGS_X8632' : '-assemble -filetype=obj -arch=x86 -triple=i686-nacl',
28 'AS_FLAGS_X8664' : '-assemble -filetype=obj -arch=x86-64 -triple=x86_64-nacl', 29 'AS_FLAGS_X8664' : '-assemble -filetype=obj -arch=x86-64 -triple=x86_64-nacl',
29 30
30 'RUN_BITCODE_AS' : '${LLVM_AS} ${input} -o ${output}', 31 'RUN_BITCODE_AS' : '${LLVM_AS} ${input} -o ${output}',
31 'RUN_NATIVE_AS' : '${AS_%ARCH%} ${AS_FLAGS_%ARCH%} ${input} -o ${output}', 32 'RUN_NATIVE_AS' : '${AS_%ARCH%} ${AS_FLAGS_%ARCH%} ${input} -o ${output}',
32 33
33 # NOTE: should we run the vanilla preprocessor instead? 34 # NOTE: should we run the vanilla preprocessor instead?
34 'RUN_PP' : '${CLANG} -E ${ASPP_FLAGS} ${input} -o ${output}' 35 'RUN_PP' : '${CLANG} -E ${ASPP_FLAGS} ${input} -o ${output}'
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 driver_tools.RunWithLog("${RUN_BITCODE_AS}") 115 driver_tools.RunWithLog("${RUN_BITCODE_AS}")
115 else: 116 else:
116 # .s to .o 117 # .s to .o
117 driver_tools.RunWithLog("${RUN_NATIVE_AS}") 118 driver_tools.RunWithLog("${RUN_NATIVE_AS}")
118 env.pop() 119 env.pop()
119 return 0 120 return 0
120 121
121 122
122 if __name__ == "__main__": 123 if __name__ == "__main__":
123 driver_tools.DriverMain(main) 124 driver_tools.DriverMain(main)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698