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

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: Fix typo for srlv opcode Created 4 years, 2 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/szbuild.py ('k') | pydir/utils.py » ('j') | 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 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 globs = glob.glob('/usr/mipsel-linux-gnu/include/c++/*/mipsel-linux-gnu')
20 return globs[-1] if globs else '/invalid/mips/include/path'
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',
28 sb_emu='elf_i386_nacl', 31 sb_emu='elf_i386_nacl',
29 cross_headers=[]) 32 cross_headers=[])
30 33
31 X8664Target = TargetInfo(target='x8664', 34 X8664Target = TargetInfo(target='x8664',
32 compiler_arch='x8664', 35 compiler_arch='x8664',
33 triple='x86_64-none-linux-gnux32', 36 triple='x86_64-none-linux-gnux32',
34 llc_flags=['-mcpu=x86-64'], 37 llc_flags=['-mcpu=x86-64'],
35 ld_emu='elf32_x86_64_nacl', 38 ld_emu='elf32_x86_64_nacl',
36 sb_emu='elf_x86_64_nacl', 39 sb_emu='elf_x86_64_nacl',
37 cross_headers=[]) 40 cross_headers=[])
38 41
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',
48 '-arm-enable-dwarf-eh=1'],
45 ld_emu='armelf_nacl', 49 ld_emu='armelf_nacl',
46 sb_emu='armelf_nacl', 50 sb_emu='armelf_nacl',
47 cross_headers=['-isystem', FindARMCrossInclude()]) 51 cross_headers=['-isystem', FindARMCrossInclude()])
48 52
53 # Investigate:
54 # ld_emu script mips_nacl is not present in binutils. How to get it?
55 MIPS32Target = TargetInfo(target='mips32',
56 compiler_arch='mips32',
57 triple='mipsel-linux-gnu',
58 llc_flags=[],
59 ld_emu='mips_nacl',
60 sb_emu='mips_nacl',
61 cross_headers=['-isystem', FindMIPSCrossInclude()])
62
49 def ConvertTripleToNaCl(nonsfi_triple): 63 def ConvertTripleToNaCl(nonsfi_triple):
50 return nonsfi_triple[:nonsfi_triple.find('-linux')] + '-nacl' 64 return nonsfi_triple[:nonsfi_triple.find('-linux')] + '-nacl'
OLDNEW
« no previous file with comments | « pydir/szbuild.py ('k') | pydir/utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698