bp2build: remove libc_tzcode from denylist. am: 3950cd6ed4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1704770 Change-Id: I74ab40938e180020281545059540570515fcc5a6
This commit is contained in:
commit
2700ace254
|
@ -207,7 +207,6 @@ var (
|
|||
"libc_jemalloc_wrapper", // http://b/187012490, cc_library_static, depends on //external/jemalloc_new:libjemalloc5 (http://b/186828626)
|
||||
"libc_ndk", // http://b/187013218, cc_library_static, depends on //bionic/libm:libm (http://b/183064661)
|
||||
"libc", // http://b/183064430, cc_library, depends on //external/jemalloc_new:libjemalloc5 (http://b/186828626)
|
||||
"libc_tzcode", // http://b/186822591, cc_library_static, localtime.c:84:46: error: expected expression
|
||||
"libc_bionic_ndk", // http://b/186822256, cc_library_static, signal.cpp:186:52: error: ISO C++ requires field designators to be specified in declaration order
|
||||
"libc_malloc_hooks", // http://b/187016307, cc_library, ld.lld: error: undefined symbol: __malloc_hook
|
||||
"libm", // http://b/183064661, cc_library, math.h:25:16: error: unexpected token in argument list
|
||||
|
|
|
@ -443,6 +443,32 @@ cc_library {
|
|||
"//conditions:default": [],
|
||||
}),
|
||||
srcs = ["c.cpp"],
|
||||
)`},
|
||||
},
|
||||
{
|
||||
description: "cc_library spaces in copts",
|
||||
moduleTypeUnderTest: "cc_library",
|
||||
moduleTypeUnderTestFactory: cc.LibraryFactory,
|
||||
moduleTypeUnderTestBp2BuildMutator: cc.CcLibraryBp2Build,
|
||||
depsMutators: []android.RegisterMutatorFunc{cc.RegisterDepsBp2Build},
|
||||
dir: "foo/bar",
|
||||
filesystem: map[string]string{
|
||||
"foo/bar/Android.bp": `
|
||||
cc_library {
|
||||
name: "a",
|
||||
cflags: ["-include header.h",],
|
||||
bazel_module: { bp2build_available: true },
|
||||
}
|
||||
`,
|
||||
},
|
||||
bp: soongCcLibraryPreamble,
|
||||
expectedBazelTargets: []string{`cc_library(
|
||||
name = "a",
|
||||
copts = [
|
||||
"-include",
|
||||
"header.h",
|
||||
"-Ifoo/bar",
|
||||
],
|
||||
)`},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ import (
|
|||
"android/soong/android"
|
||||
"android/soong/bazel"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// bp2build functions and helpers for converting cc_* modules to Bazel.
|
||||
|
@ -188,7 +189,13 @@ func bp2BuildParseCompilerProps(ctx android.TopDownMutatorContext, module *Modul
|
|||
|
||||
// Parse the list of copts.
|
||||
parseCopts := func(baseCompilerProps *BaseCompilerProperties) []string {
|
||||
copts := append([]string{}, baseCompilerProps.Cflags...)
|
||||
var copts []string
|
||||
for _, flag := range baseCompilerProps.Cflags {
|
||||
// Soong's cflags can contain spaces, like `-include header.h`. For
|
||||
// Bazel's copts, split them up to be compatible with the
|
||||
// no_copts_tokenization feature.
|
||||
copts = append(copts, strings.Split(flag, " ")...)
|
||||
}
|
||||
for _, dir := range parseLocalIncludeDirs(baseCompilerProps) {
|
||||
copts = append(copts, includeFlag(dir))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue