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

Unified Diff: toolchain_build/toolchain_build_pnacl.py

Issue 1608263003: Revert of [PNaCl toolchain] Stop building and using custom libc++ for OSX hosts (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: toolchain_build/toolchain_build_pnacl.py
diff --git a/toolchain_build/toolchain_build_pnacl.py b/toolchain_build/toolchain_build_pnacl.py
index 218ddd9cddcb30dadfc2c3d33ea395aac5d65d17..985a520e4df8305c1792ee696d1c182a95a89ed9 100755
--- a/toolchain_build/toolchain_build_pnacl.py
+++ b/toolchain_build/toolchain_build_pnacl.py
@@ -272,23 +272,18 @@
if TripleIsLinux(host) and not TripleIsX8664(host):
# Chrome clang defaults to 64-bit builds, even when run on 32-bit Linux.
extra_cc_flags += ['-m32']
- if not opts.gcc and host != 'le32-nacl':
- # On mac and linux, use libc++ instead of libstdc++ (which is too old on
- # Ubuntu Precise and any OSX to build LLVM)
- result['CXXFLAGS'] += ['-stdlib=libc++']
- if TripleIsLinux(host):
- # Use our own libc++ on Linux.
- # TODO(dschuff): Get the Chrome clang maintainers to build libc++ for
- # Linux too and use that.
- result['CXXFLAGS'] += ['-I%(' + FlavoredName('abs_libcxx', host, opts) +
- ')s/include/c++/v1']
- result['LDFLAGS'] += ['-L%(' + FlavoredName('abs_libcxx',
+ if opts.gcc or host == 'le32-nacl':
+ result['CFLAGS'] += extra_cc_flags
+ result['CXXFLAGS'] += extra_cc_flags
+ else:
+ result['CFLAGS'] += extra_cc_flags
+ result['LDFLAGS'] += ['-L%(' + FlavoredName('abs_libcxx',
host, opts) + ')s/lib']
- deps.append(FlavoredName('libcxx', host, opts))
-
- result['CFLAGS'] += extra_cc_flags
- result['CXXFLAGS'] += extra_cc_flags
-
+ result['CXXFLAGS'] += ([
+ '-stdlib=libc++',
+ '-I%(' + FlavoredName('abs_libcxx', host, opts) + ')s/include/c++/v1'] +
+ extra_cc_flags)
+ deps.append(FlavoredName('libcxx', host, opts))
return result, deps
@@ -577,9 +572,14 @@
def CopyHostLibcxxForLLVMBuild(host, dest, options):
"""Copy libc++ to the working directory for build tools."""
- if options.gcc or not TripleIsLinux(host):
+ if options.gcc:
return []
- libname = 'libc++.so.1'
+ if TripleIsLinux(host):
+ libname = 'libc++.so.1'
+ elif TripleIsMac(host):
+ libname = 'libc++.1.dylib'
+ else:
+ return []
return [command.Mkdir(dest, parents=True),
command.Copy('%(' +
FlavoredName('abs_libcxx', host, options) +')s/lib/' +
@@ -631,8 +631,8 @@
],
},
})
- elif TripleIsLinux(host) and not options.gcc:
- # Our Libc++ is only needed for Precise and only tested with clang.
+ elif not options.gcc:
+ # Libc++ is only tested with the clang build
libcxx_host_arch_flags, libcxx_inputs = LibCxxHostArchFlags(host)
libs.update({
H('libcxx'): {
@@ -950,7 +950,7 @@
},
}
- if TripleIsWindows(host) or TripleIsLinux(host) and not options.gcc:
+ if TripleIsWindows(host) or not options.gcc:
host_lib = 'libdl' if TripleIsWindows(host) else H('libcxx')
compiler['target_lib_compiler']['dependencies'].append(host_lib)
compiler['target_lib_compiler']['commands'].append(
@@ -1198,7 +1198,7 @@
'binutils_x86_%s' % legal_triple,
'llvm_%s' % legal_triple,
'driver_%s' % legal_triple])
- if os_name == 'linux':
+ if os_name != 'win':
host_packages[os_name].append('libcxx_%s' % legal_triple)
# Unsandboxed target IRT libraries
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698