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

Side by Side Diff: pydir/targets.py

Issue 1232183002: Add an cross include path for ARM to work around clang bug 22937. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 5 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 | « pydir/crosstest.py ('k') | 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 #!/usr/bin/env python2 1 #!/usr/bin/env python2
2 2
3 from collections import namedtuple 3 from collections import namedtuple
4 import glob
5
6
7 # Why have 'cross_headers':
8 # For some reason, clang doesn't know how to find some of the libstdc++
9 # headers (c++config.h). Manually add in one of the paths:
10 # https://llvm.org/bugs/show_bug.cgi?id=22937
11 # Otherwise, we could assume the system has arm-linux-gnueabihf-g++ and
12 # use that instead of clang, but so far we've just been using clang for
13 # the unsandboxed build.
14 def FindARMCrossInclude():
15 return glob.glob(
16 '/usr/arm-linux-gnueabihf/include/c++/*/arm-linux-gnueabihf')[-1]
17
4 18
5 TargetInfo = namedtuple('TargetInfo', 19 TargetInfo = namedtuple('TargetInfo',
6 ['target', 'triple', 'llc_flags', 'ld_emu']) 20 ['target', 'triple', 'llc_flags', 'ld_emu',
21 'cross_headers'])
7 22
8 X8632Target = TargetInfo(target='x8632', 23 X8632Target = TargetInfo(target='x8632',
9 triple='i686-none-linux', 24 triple='i686-none-linux',
10 llc_flags=['-mcpu=pentium4m'], 25 llc_flags=['-mcpu=pentium4m'],
11 ld_emu='elf_i386_nacl') 26 ld_emu='elf_i386_nacl',
27 cross_headers=[])
12 28
13 X8664Target = TargetInfo(target='x8664', 29 X8664Target = TargetInfo(target='x8664',
14 triple='x86_64-none-linux', 30 triple='x86_64-none-linux',
15 llc_flags=['-mcpu=x86-64'], 31 llc_flags=['-mcpu=x86-64'],
16 ld_emu='elf_x86_64_nacl') 32 ld_emu='elf_x86_64_nacl',
33 cross_headers=[])
17 34
18 ARM32Target = TargetInfo(target='arm32', 35 ARM32Target = TargetInfo(target='arm32',
19 triple='armv7a-none-linux-gnueabihf', 36 triple='armv7a-none-linux-gnueabihf',
20 llc_flags=['-mcpu=cortex-a9', 37 llc_flags=['-mcpu=cortex-a9',
21 '-float-abi=hard', 38 '-float-abi=hard',
22 '-mattr=+neon'], 39 '-mattr=+neon'],
23 ld_emu='armelf_nacl') 40 ld_emu='armelf_nacl',
41 cross_headers=['-isystem', FindARMCrossInclude()])
24 42
25 43
26 def ConvertTripleToNaCl(nonsfi_triple): 44 def ConvertTripleToNaCl(nonsfi_triple):
27 return nonsfi_triple.replace('linux', 'nacl') 45 return nonsfi_triple.replace('linux', 'nacl')
OLDNEW
« no previous file with comments | « pydir/crosstest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698