Skip to content
Snippets Groups Projects
Commit e695da46 authored by Michael Sun's avatar Michael Sun
Browse files

floss: have floss built with libstructuredmetrics

Update the Floss build process to utilize the new GN flag target_os and
environmental variable TARGET_OS_VARIENT to include
libstructuredmetrics when building for ChromeOS. Correct GN syntaxes.

BUG: 232098615
Tag: #floss
Test: ./build.py --target test
Test: emerge-${BOARD} floss

Change-Id: I0bf960751643f12f7e1ef03c7aa844d112fbb5d5
parent 43f85a74
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ group("all") {
}
# Tools should be built for the host target.
if (host_cpu == target_cpu && host_os == target_os) {
if (target_os == "linux") {
group("tools") {
deps = [ "//bt/system:tools" ]
}
......
......@@ -103,12 +103,15 @@ config("target_defaults") {
"-Wno-unknown-warning-option",
"-Wno-final-dtor-non-final-class",
string_join("", ["-ffile-prefix-map=", rebase_path(".", "${root_build_dir}", "."), "/= "])
string_join("",
[
"-ffile-prefix-map=",
rebase_path(".", "${root_build_dir}", "."),
"/= ",
]),
]
cflags_cc = [
"-std=c++17",
]
cflags_cc = [ "-std=c++17" ]
defines = [
"HAS_NO_BDROID_BUILDCFG",
......@@ -117,7 +120,7 @@ config("target_defaults") {
"TARGET_FLOSS",
"EXPORT_SYMBOL=__attribute__((visibility(\"default\")))",
"FALLTHROUGH_INTENDED=[[clang::fallthrough]]",
"BTIF_HF_FEATURES=0x00000640"
"BTIF_HF_FEATURES=0x00000640",
]
if (!(defined(use.bt_nonstandard_codecs) && use.bt_nonstandard_codecs)) {
......@@ -125,6 +128,10 @@ config("target_defaults") {
}
configs = [ ":external_libchrome" ]
if (target_os == "chromeos") {
configs += [ ":external_chromeos" ]
}
}
group("libbt-platform-protos-lite") {
......@@ -223,3 +230,14 @@ if (defined(use.bt_nonstandard_codecs) && use.bt_nonstandard_codecs) {
pkg_deps = [ "ldacBT-abr" ]
}
}
# To include ChroemOS-specific libraries and build dependencies.
if (target_os == "chromeos") {
config("external_chromeos") {
configs = [ ":pkgpkg_libstructuredmetrics" ]
}
pkg_config("pkgpkg_libstructuredmetrics") {
pkg_deps = [ "libstructuredmetrics" ]
}
}
......@@ -26,5 +26,10 @@ fn main() {
Config::new().probe("libmodp_b64").unwrap();
Config::new().probe("tinyxml2").unwrap();
// Include ChromeOS-specific dependencies.
if option_env!("TARGET_OS_VARIANT").unwrap_or("None").to_string() == "chromeos" {
Config::new().probe("libstructuredmetrics").unwrap();
}
println!("cargo:rerun-if-changed=build.rs");
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment