mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Compile and statically link in our own libcxx on Linux. (#266)
This does not apply to i386 Linux builds. We cannot build libcxx for that. Besides that target is going away anyway as after the gen_snapshot migration is complete.
This commit is contained in:
parent
ad2256a529
commit
c5a493b255
@ -535,7 +535,7 @@ if (custom_toolchain != "") {
|
|||||||
#
|
#
|
||||||
# Variables
|
# Variables
|
||||||
# no_default_deps: If true, no standard dependencies will be added.
|
# no_default_deps: If true, no standard dependencies will be added.
|
||||||
if (is_android) {
|
if (is_android || (is_linux && current_cpu != "x86")) {
|
||||||
foreach(_target_type,
|
foreach(_target_type,
|
||||||
[
|
[
|
||||||
"executable",
|
"executable",
|
||||||
|
@ -603,20 +603,15 @@ config("runtime_library") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Linux standard liburary setup.
|
# Linux standard library setup.
|
||||||
# TODO(chinmaygarde): We are only using C++14 on x64 hosts (with a static
|
# We compile our own libc++ on all Linux targets except i386 (for
|
||||||
# libcxx and libcxxabi from buildtools) because the static libraries
|
# gen_snapshot) where this is not supported.
|
||||||
# in buildtools are not compatible with x86. This will be rectified soon
|
|
||||||
# with libcxx and libcxxabi providing their own GN files. The "current_cpu"
|
|
||||||
# check can then be removed. So far, the only target that need x86 don't
|
|
||||||
# also require C++14.
|
|
||||||
# Tracked in https://fuchsia.atlassian.net/browse/TO-61
|
|
||||||
if (is_linux) {
|
if (is_linux) {
|
||||||
if (current_cpu != "x86") {
|
if (current_cpu != "x86") {
|
||||||
cflags_cc += [ "-stdlib=libc++" ]
|
cflags_cc += [ "-nostdinc++" ]
|
||||||
ldflags += [
|
include_dirs = [
|
||||||
"-stdlib=libc++",
|
"//third_party/libcxx/include",
|
||||||
"-static-libstdc++",
|
"//third_party/libcxxabi/include",
|
||||||
]
|
]
|
||||||
} else {
|
} else {
|
||||||
cflags_cc += [ "-stdlib=libstdc++" ]
|
cflags_cc += [ "-stdlib=libstdc++" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user