Merge "bp2build: handle system_shared_libs"

This commit is contained in:
Christopher Parsons
2021-08-09 19:11:00 +00:00
committed by Gerrit Code Review
10 changed files with 543 additions and 59 deletions

View File

@@ -204,16 +204,11 @@ var (
"libBionicBenchmarksUtils", // cc_library_static, fatal error: 'map' file not found, from libcxx
"fmtlib", // cc_library_static, fatal error: 'cassert' file not found, from libcxx
"fmtlib_ndk", // cc_library_static, fatal error: 'cassert' file not found
"liblog", // http://b/186822772: cc_library, 'sys/cdefs.h' file not found
"libbase", // Requires liblog. http://b/186826479, cc_library, fatal error: 'memory' file not found, from libcxx.
// Also depends on fmtlib.
// http://b/186024507: Includes errors because of the system_shared_libs default value.
// Missing -isystem bionic/libc/include through the libc/libm/libdl
// default dependencies if system_shared_libs is unset.
"liblog", // http://b/186822772: cc_library, 'sys/cdefs.h' file not found
"libjemalloc5_jet", // cc_library, 'sys/cdefs.h' file not found
"libseccomp_policy", // http://b/186476753: cc_library, 'linux/filter.h' not found
"note_memtag_heap_async", // http://b/185127353: cc_library_static, error: feature.h not found
"note_memtag_heap_sync", // http://b/185127353: cc_library_static, error: feature.h not found
"libseccomp_policy", // depends on libbase
"gwp_asan_crash_handler", // cc_library, ld.lld: error: undefined symbol: memset

View File

@@ -115,6 +115,11 @@ func BazelLabelForModuleWholeDepsExcludes(ctx BazelConversionPathContext, module
func bazelLabelForModuleDeps(ctx BazelConversionPathContext, modules []string, isWholeLibs bool) bazel.LabelList {
var labels bazel.LabelList
// In some cases, a nil string list is different than an explicitly empty list.
if len(modules) == 0 && modules != nil {
labels.Includes = []bazel.Label{}
return labels
}
for _, module := range modules {
bpText := module
if m := SrcIsModule(module); m == "" {