sysprop_library: cflags + ldflags
Needed by some in order to build 16K compatible code on projects shared with multiple Android branches. Bug: 299403996 Test: build Change-Id: I6224803d5ca014f98faf8b0a20f1d4fd3c2bcbe2
This commit is contained in:
parent
786c44f9f3
commit
c43a4acc8b
1 changed files with 10 additions and 0 deletions
|
@ -172,6 +172,12 @@ type syspropLibraryProperties struct {
|
||||||
// Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
|
// Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX).
|
||||||
// Forwarded to cc_library.min_sdk_version
|
// Forwarded to cc_library.min_sdk_version
|
||||||
Min_sdk_version *string
|
Min_sdk_version *string
|
||||||
|
|
||||||
|
// C compiler flags used to build library
|
||||||
|
Cflags []string
|
||||||
|
|
||||||
|
// Linker flags used to build binary
|
||||||
|
Ldflags []string
|
||||||
}
|
}
|
||||||
|
|
||||||
Java struct {
|
Java struct {
|
||||||
|
@ -416,6 +422,8 @@ type ccLibraryProperties struct {
|
||||||
Host_supported *bool
|
Host_supported *bool
|
||||||
Apex_available []string
|
Apex_available []string
|
||||||
Min_sdk_version *string
|
Min_sdk_version *string
|
||||||
|
Cflags []string
|
||||||
|
Ldflags []string
|
||||||
Bazel_module struct {
|
Bazel_module struct {
|
||||||
Label *string
|
Label *string
|
||||||
}
|
}
|
||||||
|
@ -511,6 +519,8 @@ func syspropLibraryHook(ctx android.LoadHookContext, m *syspropLibrary) {
|
||||||
ccProps.Host_supported = m.properties.Host_supported
|
ccProps.Host_supported = m.properties.Host_supported
|
||||||
ccProps.Apex_available = m.ApexProperties.Apex_available
|
ccProps.Apex_available = m.ApexProperties.Apex_available
|
||||||
ccProps.Min_sdk_version = m.properties.Cpp.Min_sdk_version
|
ccProps.Min_sdk_version = m.properties.Cpp.Min_sdk_version
|
||||||
|
ccProps.Cflags = m.properties.Cpp.Cflags
|
||||||
|
ccProps.Ldflags = m.properties.Cpp.Ldflags
|
||||||
ccProps.Bazel_module.Label = label
|
ccProps.Bazel_module.Label = label
|
||||||
ctx.CreateModule(cc.LibraryFactory, &ccProps)
|
ctx.CreateModule(cc.LibraryFactory, &ccProps)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue