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

Side by Side Diff: pydir/targets.py

Issue 2085303002: Subzero, MIPS32: Cross-testing enabled for MIPS32 (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Crosstests running Created 4 years, 4 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
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 4 import glob
5 5
6 6
7 # Why have 'cross_headers': 7 # Why have 'cross_headers':
8 # For some reason, clang doesn't know how to find some of the libstdc++ 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: 9 # headers (c++config.h). Manually add in one of the paths:
10 # https://llvm.org/bugs/show_bug.cgi?id=22937 10 # https://llvm.org/bugs/show_bug.cgi?id=22937
11 # Otherwise, we could assume the system has arm-linux-gnueabihf-g++ and 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 12 # use that instead of clang, but so far we've just been using clang for
13 # the unsandboxed build. 13 # the unsandboxed build.
14 def FindARMCrossInclude(): 14 def FindARMCrossInclude():
15 return glob.glob( 15 return glob.glob(
16 '/usr/arm-linux-gnueabihf/include/c++/*/arm-linux-gnueabihf')[-1] 16 '/usr/arm-linux-gnueabihf/include/c++/*/arm-linux-gnueabihf')[-1]
17 17
18 def FindMIPSCrossInclude():
19 return glob.glob(
Jim Stichnoth 2016/09/02 15:49:31 This fails on a system without MIPS libraries, e.g
obucinac 2016/09/05 16:55:59 Done.
20 '/usr/mipsel-linux-gnu/include/c++/*/mipsel-linux-gnu')[-1]
18 21
19 TargetInfo = namedtuple('TargetInfo', 22 TargetInfo = namedtuple('TargetInfo',
20 ['target', 'compiler_arch', 'triple', 'llc_flags', 23 ['target', 'compiler_arch', 'triple', 'llc_flags',
21 'ld_emu', 'sb_emu', 'cross_headers']) 24 'ld_emu', 'sb_emu', 'cross_headers'])
22 25
23 X8632Target = TargetInfo(target='x8632', 26 X8632Target = TargetInfo(target='x8632',
24 compiler_arch='x8632', 27 compiler_arch='x8632',
25 triple='i686-none-linux', 28 triple='i686-none-linux',
26 llc_flags=['-mcpu=pentium4m'], 29 llc_flags=['-mcpu=pentium4m'],
27 ld_emu='elf_i386_nacl', 30 ld_emu='elf_i386_nacl',
(...skipping 11 matching lines...) Expand all
39 ARM32Target = TargetInfo(target='arm32', 42 ARM32Target = TargetInfo(target='arm32',
40 compiler_arch='armv7', 43 compiler_arch='armv7',
41 triple='armv7a-none-linux-gnueabihf', 44 triple='armv7a-none-linux-gnueabihf',
42 llc_flags=['-mcpu=cortex-a9', 45 llc_flags=['-mcpu=cortex-a9',
43 '-float-abi=hard', 46 '-float-abi=hard',
44 '-mattr=+neon'], 47 '-mattr=+neon'],
45 ld_emu='armelf_nacl', 48 ld_emu='armelf_nacl',
46 sb_emu='armelf_nacl', 49 sb_emu='armelf_nacl',
47 cross_headers=['-isystem', FindARMCrossInclude()]) 50 cross_headers=['-isystem', FindARMCrossInclude()])
48 51
52 MIPS32Target = TargetInfo(target='mips32',
53 compiler_arch='mips32',
54 triple='mipsel-linux-gnu',
55 llc_flags=[],
56 ld_emu='mips_nacl',
57 sb_emu='mips_nacl',
58 cross_headers=['-isystem', FindMIPSCrossInclude()])
Jim Stichnoth 2016/08/23 14:56:49 fix alignment
obucinac 2016/09/05 16:55:59 Done.
59
49 def ConvertTripleToNaCl(nonsfi_triple): 60 def ConvertTripleToNaCl(nonsfi_triple):
50 return nonsfi_triple[:nonsfi_triple.find('-linux')] + '-nacl' 61 return nonsfi_triple[:nonsfi_triple.find('-linux')] + '-nacl'
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698