summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-10-22 21:29:17 -0700
committerNico Weber <thakis@chromium.org>2015-10-23 04:33:51 +0000
commit7ef5508bd7b471d7b4a67886e23feb89a3a13713 (patch)
tree0c93566bc79fe584b7e4ac8f7262a39cc7b29ba0
parentc9ed36702b1668181f1ee563bec74c196c5846fd (diff)
downloadchromium_src-7ef5508bd7b471d7b4a67886e23feb89a3a13713.zip
chromium_src-7ef5508bd7b471d7b4a67886e23feb89a3a13713.tar.gz
chromium_src-7ef5508bd7b471d7b4a67886e23feb89a3a13713.tar.bz2
mac: Pull a prebuilt libc++-static.a.
Not used for anything yet. BUG=400091 R=mark@chromium.org TBR=torne Review URL: https://codereview.chromium.org/1415213004 . Cr-Commit-Position: refs/heads/master@{#355729}
-rw-r--r--.gitignore1
-rw-r--r--DEPS12
-rwxr-xr-xandroid_webview/tools/webview_licenses.py2
-rw-r--r--third_party/libc++-static/LICENSE.TXT76
-rw-r--r--third_party/libc++-static/README.chromium30
-rwxr-xr-xthird_party/libc++-static/build.sh53
-rw-r--r--third_party/libc++-static/libc++-static.a.sha11
-rw-r--r--third_party/libc++-static/libcxxabi.patch17
8 files changed, 191 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index cb00641..ef33bc3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -335,6 +335,7 @@ v8.log
/third_party/khronos_glcts
/third_party/leveldatabase/src
/third_party/leveldb
+/third_party/libc++-static/libc++-static.a
/third_party/libaddressinput/src
/third_party/libexif/sources
/third_party/libjingle/source
diff --git a/DEPS b/DEPS
index 72fab81..0d0120b 100644
--- a/DEPS
+++ b/DEPS
@@ -673,6 +673,18 @@ hooks = [
'-s', 'src/buildtools/linux64/clang-format.sha1',
],
},
+ # Pull the prebuilt libc++ static library for mac.
+ {
+ 'name': 'libcpp_mac',
+ 'pattern': '.',
+ 'action': [ 'download_from_google_storage',
+ '--no_resume',
+ '--platform=darwin',
+ '--no_auth',
+ '--bucket', 'chromium-libcpp',
+ '-s', 'src/third_party/libc++-static/libc++-static.a.sha1',
+ ],
+ },
# Pull luci-go binaries (isolate, swarming) using checked-in hashes.
{
'name': 'luci-go_win',
diff --git a/android_webview/tools/webview_licenses.py b/android_webview/tools/webview_licenses.py
index 87e55fc..345ef9a 100755
--- a/android_webview/tools/webview_licenses.py
+++ b/android_webview/tools/webview_licenses.py
@@ -12,7 +12,7 @@ be used to generate an Android NOTICE file for the third-party code.
It makes use of src/tools/licenses.py and the README.chromium files on which
it depends. It also makes use of a data file, third_party_files_whitelist.txt,
-which whitelists indicidual files which contain third-party code but which
+which whitelists individual files which contain third-party code but which
aren't in a third-party directory with a README.chromium file.
"""
diff --git a/third_party/libc++-static/LICENSE.TXT b/third_party/libc++-static/LICENSE.TXT
new file mode 100644
index 0000000..53352e4
--- /dev/null
+++ b/third_party/libc++-static/LICENSE.TXT
@@ -0,0 +1,76 @@
+==============================================================================
+libc++ License
+==============================================================================
+
+The libc++ library is dual licensed under both the University of Illinois
+"BSD-Like" license and the MIT license. As a user of this code you may choose
+to use it under either license. As a contributor, you agree to allow your code
+to be used under both.
+
+Full text of the relevant licenses is included below.
+
+==============================================================================
+
+University of Illinois/NCSA
+Open Source License
+
+Copyright (c) 2009-2015 by the contributors listed in CREDITS.TXT
+
+All rights reserved.
+
+Developed by:
+
+ LLVM Team
+
+ University of Illinois at Urbana-Champaign
+
+ http://llvm.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal with
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimers.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimers in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the names of the LLVM Team, University of Illinois at
+ Urbana-Champaign, nor the names of its contributors may be used to
+ endorse or promote products derived from this Software without specific
+ prior written permission.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
+SOFTWARE.
+
+==============================================================================
+
+Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/third_party/libc++-static/README.chromium b/third_party/libc++-static/README.chromium
new file mode 100644
index 0000000..e6f6efb
--- /dev/null
+++ b/third_party/libc++-static/README.chromium
@@ -0,0 +1,30 @@
+Short Name: libcxx
+Name: Descriptive name of the package
+Short Name: Name the package is distributed under (ex. libxml, openssl, etc)
+Security Critical: Yes
+License: MIT
+License File: LICENSE.TXT
+Version: 0
+Revision: 245965
+URL: http://libcxx.llvm.org/
+
+To upload:
+ python ~/depot_tools/upload_to_google_storage.py -b chromium-libcpp third_party/libc++-static.a
+
+To initialize gsutil's credentials:
+ python ~/depot_tools/third_party/gsutil/gsutil config
+
+ That will give a URL which you should log into with your web browser. The
+ username should be the one that is on the ACL for the "chromium-libcpp"
+ bucket (probably your @google.com address). Contact the build team for help
+ getting access if necessary.
+
+ Copy the code back to the command line util. Ignore the project ID (it's OK
+ to just leave blank when prompted).
+
+gsutil documentation:
+ https://developers.google.com/storage/docs/gsutil
+
+
+To build: Run `third_party/libc++-static/build.sh`. It'll upload to google
+storage and update the .sha1 file.
diff --git a/third_party/libc++-static/build.sh b/third_party/libc++-static/build.sh
new file mode 100755
index 0000000..96d490c
--- /dev/null
+++ b/third_party/libc++-static/build.sh
@@ -0,0 +1,53 @@
+#!/bin/bash
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+set -eux
+
+REV=245965
+DIR=$(mktemp -d -t libcpp)
+
+THIS_DIR="${PWD}/$(dirname "${0}")"
+
+# TODO(thakis): Figure out why our clang complains about visibility and
+# redeclarations.
+#CXX="$THIS_DIR/../llvm-build/Release+Asserts/bin/clang++"
+CXX=c++
+
+
+FLAGS="-nostdinc++ -O3 -std=c++11 -fstrict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -arch i386 -arch x86_64 -isysroot $(xcrun -show-sdk-path)"
+
+pushd "${DIR}"
+
+svn co --force https://llvm.org/svn/llvm-project/libcxx/trunk@$REV libcxx
+svn co --force https://llvm.org/svn/llvm-project/libcxxabi/trunk@$REV libcxxabi
+
+mkdir libcxxbuild
+cd libcxxbuild
+
+mkdir libcxx
+pushd libcxx
+sed -i '' 's/"default"/"hidden"/g' ../../libcxx/include/__config
+"$CXX" -c -I../../libcxx/include/ ../../libcxx/src/*.cpp $FLAGS
+popd
+
+mkdir libcxxabi
+pushd libcxxabi
+sed -i '' 's/"default"/"hidden"/g' ../../libcxxabi/src/*
+sed -i '' 's/push(default)/push(hidden)/g' ../../libcxxabi/src/*
+
+# Let the default handler not depend on __cxa_demangle, this saves 0.5MB binary
+# size in each binary linking against libc++-static.a
+patch -d ../../libcxxabi -p0 < "${THIS_DIR}/libcxxabi.patch"
+
+"$CXX" -c -I../../libcxx/include/ -I../../libcxxabi/include ../../libcxxabi/src/*.cpp $FLAGS
+popd
+
+libtool -static -o libc++-static.a libcxx*/*.o
+
+cp libc++-static.a "${THIS_DIR}"
+upload_to_google_storage.py -b chromium-libcpp "${THIS_DIR}/libc++-static.a"
+
+popd
+rm -rf "${DIR}"
diff --git a/third_party/libc++-static/libc++-static.a.sha1 b/third_party/libc++-static/libc++-static.a.sha1
new file mode 100644
index 0000000..06a3493
--- /dev/null
+++ b/third_party/libc++-static/libc++-static.a.sha1
@@ -0,0 +1 @@
+c1f2875483dd79ca3e0fe514014c3ea52d9f2b14 \ No newline at end of file
diff --git a/third_party/libc++-static/libcxxabi.patch b/third_party/libc++-static/libcxxabi.patch
new file mode 100644
index 0000000..dfdf766
--- /dev/null
+++ b/third_party/libc++-static/libcxxabi.patch
@@ -0,0 +1,17 @@
+--- src/cxa_default_handlers.cpp (revision 245965)
++++ src/cxa_default_handlers.cpp (working copy)
+@@ -46,13 +46,7 @@
+ exception_header + 1;
+ const __shim_type_info* thrown_type =
+ static_cast<const __shim_type_info*>(exception_header->exceptionType);
+- // Try to get demangled name of thrown_type
+- int status;
+- char buf[1024];
+- size_t len = sizeof(buf);
+- const char* name = __cxa_demangle(thrown_type->name(), buf, &len, &status);
+- if (status != 0)
+- name = thrown_type->name();
++ const char* name = thrown_type->name();
+ // If the uncaught exception can be caught with std::exception&
+ const __shim_type_info* catch_type =
+ static_cast<const __shim_type_info*>(&typeid(std::exception));