blob: 9ca6f900feeb4e130c355e5ce486a05fe4cd42e0 [file] [log] [blame]
// This introduces the module type library_linking_strategy_cc_defaults
// To use in other Android.bp files, add the following lines:
// soong_config_module_type_import {
// from: "system/apex/Android.bp",
// module_types: ["library_linking_strategy_cc_defaults"],
// }
soong_config_string_variable {
name: "library_linking_strategy",
values: [
"prefer_static",
],
}
soong_config_module_type {
name: "library_linking_strategy_cc_defaults",
module_type: "cc_defaults",
config_namespace: "ANDROID",
variables: ["library_linking_strategy"],
properties: [
"shared_libs",
"static_libs",
"stl",
],
}
library_linking_strategy_cc_defaults {
name: "library_linking_strategy_sample_defaults",
soong_config_variables: {
library_linking_strategy: {
prefer_static: {
static_libs: [
"libbase",
"liblog",
],
stl: "c++_static",
},
conditions_default: {
shared_libs: [
"libbase",
"liblog",
],
},
},
},
}
cc_binary {
name: "library_linking_strategy_sample_binary",
srcs: ["library_linking_strategy.cc"],
defaults: ["library_linking_strategy_sample_defaults"],
}