Index: third_party/libc++/BUILD.gn |
diff --git a/third_party/libc++/BUILD.gn b/third_party/libc++/BUILD.gn |
new file mode 100644 |
index 0000000000000000000000000000000000000000..46f0f92c2902c0d5ca9b3b511ef6c6038fcb9166 |
--- /dev/null |
+++ b/third_party/libc++/BUILD.gn |
@@ -0,0 +1,73 @@ |
+# 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. |
+ |
+shared_library("libc++") { |
+ sources = [ |
+ "trunk/src/algorithm.cpp", |
+ "trunk/src/bind.cpp", |
+ "trunk/src/chrono.cpp", |
+ "trunk/src/condition_variable.cpp", |
+ "trunk/src/debug.cpp", |
+ "trunk/src/exception.cpp", |
+ "trunk/src/future.cpp", |
+ "trunk/src/hash.cpp", |
+ "trunk/src/ios.cpp", |
+ "trunk/src/iostream.cpp", |
+ "trunk/src/locale.cpp", |
+ "trunk/src/memory.cpp", |
+ "trunk/src/mutex.cpp", |
+ "trunk/src/new.cpp", |
+ "trunk/src/optional.cpp", |
+ "trunk/src/random.cpp", |
+ "trunk/src/regex.cpp", |
+ "trunk/src/shared_mutex.cpp", |
+ "trunk/src/stdexcept.cpp", |
+ "trunk/src/string.cpp", |
+ "trunk/src/strstream.cpp", |
+ "trunk/src/system_error.cpp", |
+ "trunk/src/thread.cpp", |
+ "trunk/src/typeinfo.cpp", |
+ "trunk/src/utility.cpp", |
+ "trunk/src/valarray.cpp", |
+ ] |
+ configs -= [ |
+ "//build/config/compiler:chromium_code", |
+ "//build/config/compiler:no_rtti", |
+ "//build/config/gcc:no_exceptions", |
+ "//build/config/gcc:symbol_visibility_hidden", |
+ ] |
+ configs += [ |
+ "//build/config/compiler:no_chromium_code", |
+ "//build/config/compiler:rtti", |
+ "//build/config/sanitizers:sanitizer_options_link_helper", |
+ "//buildtools/third_party/libc++abi:config", |
+ ] |
+ |
+ # libc++abi is linked statically into libc++.so. This allows us to get both |
+ # libc++ and libc++abi by passing '-stdlib=libc++'. If libc++abi was a |
+ # separate DSO, we'd have to link against it explicitly. |
+ deps = [ |
+ "//buildtools/third_party/libc++abi", |
+ ] |
+} |
+ |
+group("libcxx_proxy") { |
+ deps = [ |
+ ":libc++", |
+ ] |
+ public_configs = [ ":link_helper" ] |
+} |
+ |
+config("link_helper") { |
+ ldflags = [ |
+ "-stdlib=libc++", |
+ |
+ # Normally the generator takes care of RPATH. Our case is special because |
+ # the generator is unaware of the libc++.so dependency. Note that setting |
+ # RPATH here is a potential security issue. See the following for another |
+ # example of this issue: https://code.google.com/p/gyp/issues/detail?id=315 |
+ "-Wl,-R,\$ORIGIN/", |
earthdok
2015/05/26 16:18:46
$ORIGIN/lib?
Sam McNally
2015/05/27 00:12:09
GN puts shared libraries in out/Foo instead of out
|
+ ] |
+ lib_dirs = [ root_build_dir ] |
+} |