This repository was archived by the owner on Apr 21, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed
build/secondary/third_party Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,12 @@ source_set("libcxx") {
4444 " //third_party/libcxxabi" ,
4545 ]
4646
47+ # TODO(goderbauer ): remove when all sources build with LTO for android_arm64.
48+ if (is_android && current_cpu == " arm64" ) {
49+ sources -= [ " src/new.cpp" ]
50+ deps += [ " :libcxx_nolto" ]
51+ }
52+
4753 public_configs = [
4854 " :libcxx_config" ,
4955 " //third_party/libcxxabi:libcxxabi_config" ,
@@ -54,10 +60,38 @@ source_set("libcxx") {
5460 " _LIBCPP_NO_RTTI" ,
5561 " _LIBCPP_BUILDING_LIBRARY" ,
5662 " LIBCXX_BUILDING_LIBCXXABI" ,
63+ " _LIBCPP_WEAK=" ,
5764 ]
5865
5966 if (is_clang ) {
6067 # shared_mutex.cpp and debug.cpp are purposefully in violation.
6168 cflags_cc = [ " -Wno-thread-safety-analysis" ]
6269 }
6370}
71+
72+ source_set (" libcxx_nolto" ) {
73+ visibility = [ " :*" ]
74+
75+ sources = [
76+ " src/new.cpp" ,
77+ ]
78+
79+ cflags_cc = [ " -fno-lto" ]
80+
81+ deps = [
82+ " //third_party/libcxxabi" ,
83+ ]
84+
85+ public_configs = [
86+ " :libcxx_config" ,
87+ " //third_party/libcxxabi:libcxxabi_config" ,
88+ ]
89+
90+ defines = [
91+ " _LIBCPP_NO_EXCEPTIONS" ,
92+ " _LIBCPP_NO_RTTI" ,
93+ " _LIBCPP_BUILDING_LIBRARY" ,
94+ " LIBCXX_BUILDING_LIBCXXABI" ,
95+ " _LIBCPP_WEAK=" ,
96+ ]
97+ }
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ config("libcxxabi_config") {
99}
1010
1111source_set (" libcxxabi" ) {
12- visibility = [ " ../libcxx" ]
12+ visibility = [ " ../libcxx:* " ]
1313
1414 sources = [
1515 " src/abort_message.cpp" ,
You can’t perform that action at this time.
0 commit comments