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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pydir/crosstest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pydir/targets.py
diff --git a/pydir/targets.py b/pydir/targets.py
index 0f6433c30e0f414001606ad68f6c25ecf2220801..c2188e5dec3af236498a9343a3c7bd45b416de65 100644
--- a/pydir/targets.py
+++ b/pydir/targets.py
@@ -1,26 +1,44 @@
#!/usr/bin/env python2
from collections import namedtuple
+import glob
+
+
+# Why have 'cross_headers':
+# For some reason, clang doesn't know how to find some of the libstdc++
+# headers (c++config.h). Manually add in one of the paths:
+# https://llvm.org/bugs/show_bug.cgi?id=22937
+# Otherwise, we could assume the system has arm-linux-gnueabihf-g++ and
+# use that instead of clang, but so far we've just been using clang for
+# the unsandboxed build.
+def FindARMCrossInclude():
+ return glob.glob(
+ '/usr/arm-linux-gnueabihf/include/c++/*/arm-linux-gnueabihf')[-1]
+
TargetInfo = namedtuple('TargetInfo',
- ['target', 'triple', 'llc_flags', 'ld_emu'])
+ ['target', 'triple', 'llc_flags', 'ld_emu',
+ 'cross_headers'])
X8632Target = TargetInfo(target='x8632',
triple='i686-none-linux',
llc_flags=['-mcpu=pentium4m'],
- ld_emu='elf_i386_nacl')
+ ld_emu='elf_i386_nacl',
+ cross_headers=[])
X8664Target = TargetInfo(target='x8664',
triple='x86_64-none-linux',
llc_flags=['-mcpu=x86-64'],
- ld_emu='elf_x86_64_nacl')
+ ld_emu='elf_x86_64_nacl',
+ cross_headers=[])
ARM32Target = TargetInfo(target='arm32',
triple='armv7a-none-linux-gnueabihf',
llc_flags=['-mcpu=cortex-a9',
'-float-abi=hard',
'-mattr=+neon'],
- ld_emu='armelf_nacl')
+ ld_emu='armelf_nacl',
+ cross_headers=['-isystem', FindARMCrossInclude()])
def ConvertTripleToNaCl(nonsfi_triple):
« 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