Fix C++ on Darwin
Port of https://android-review.googlesource.com/207241 Change-Id: Idad81a528a2104579de0225b0724bb81293eea44
This commit is contained in:
4
cc/cc.go
4
cc/cc.go
@@ -955,6 +955,10 @@ func (c *CCLinked) flags(ctx common.AndroidModuleContext, flags CCFlags) CCFlags
|
||||
// Host builds will use GNU libstdc++.
|
||||
if ctx.Device() {
|
||||
flags.CFlags = append(flags.CFlags, "-I"+common.PathForSource(ctx, "bionic/libstdc++/include").String())
|
||||
} else {
|
||||
// Host builds will use the system C++. libc++ on Darwin, GNU libstdc++ everywhere else
|
||||
flags.CppFlags = append(flags.CppFlags, flags.Toolchain.SystemCppCppflags())
|
||||
flags.LdFlags = append(flags.LdFlags, flags.Toolchain.SystemCppLdflags())
|
||||
}
|
||||
case "ndk_system":
|
||||
ndkSrcRoot := common.PathForSource(ctx, "prebuilts/ndk/current/sources/cxx-stl/system/include")
|
||||
|
Reference in New Issue
Block a user