diff options
author | Inseob Kim <inseob@google.com> | 2019-02-08 21:00:45 +0900 |
---|---|---|
committer | Inseob Kim <inseob@google.com> | 2019-02-13 23:32:51 +0000 |
commit | c0907f191a6c466d077030500f855cdd87ec954a (patch) | |
tree | 18b82c6ebe4f81d49eb8f34a548d8ecddef7ac47 /cc/gen.go | |
parent | 58b31ad33a8df9f8ea27b9d6c928560d7a6a2452 (diff) | |
download | build_soong-c0907f191a6c466d077030500f855cdd87ec954a.tar.gz build_soong-c0907f191a6c466d077030500f855cdd87ec954a.tar.bz2 build_soong-c0907f191a6c466d077030500f855cdd87ec954a.zip |
Create sysprop_library soong module
A newly introduced sysprop_library soong module will generate a
java_sdk_library and a cc_library from .sysprop description files.
Both Java modules and C++ modules can link against sysprop_library
module, thus giving consistency for using generated sysprop API.
As Java controls accessibility of Internal / System properties with
@hide and @SystemApi, 2 different header files will be created. And
build system will selectively expose depending on the property owner
and the place where the client libraries go into.
Bug: 80125326
Bug: 122170616
Test: 1) Create sysprop_library module.
Test: 2) Create empty txt files under prebuilts/sdk.
Test: 3) Create api directory, make update-api, and see changes.
Test: 4) Try to link against sysprop_library with various clients.
Test: 5) Soc_specific, Device_specific, Product_specific, recovery flags
work as intended.
Change-Id: I78dc5780ccfbb4b69e5c61dec26b94e92d43c333
Diffstat (limited to 'cc/gen.go')
-rw-r--r-- | cc/gen.go | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -56,10 +56,11 @@ var ( sysprop = pctx.AndroidStaticRule("sysprop", blueprint.RuleParams{ - Command: "$syspropCmd --header-output-dir=$headerOutDir --source-output-dir=$srcOutDir --include-name=$includeName $in", + Command: "$syspropCmd --header-dir=$headerOutDir --system-header-dir=$systemOutDir " + + "--source-dir=$srcOutDir --include-name=$includeName $in", CommandDeps: []string{"$syspropCmd"}, }, - "headerOutDir", "srcOutDir", "includeName") + "headerOutDir", "systemOutDir", "srcOutDir", "includeName") windmc = pctx.AndroidStaticRule("windmc", blueprint.RuleParams{ @@ -114,6 +115,7 @@ func genLex(ctx android.ModuleContext, lexFile android.Path, outFile android.Mod func genSysprop(ctx android.ModuleContext, syspropFile android.Path) (android.Path, android.Path) { headerFile := android.PathForModuleGen(ctx, "sysprop", "include", syspropFile.Rel()+".h") + systemHeaderFile := android.PathForModuleGen(ctx, "sysprop/system", "include", syspropFile.Rel()+".h") cppFile := android.PathForModuleGen(ctx, "sysprop", syspropFile.Rel()+".cpp") ctx.Build(pctx, android.BuildParams{ @@ -124,6 +126,7 @@ func genSysprop(ctx android.ModuleContext, syspropFile android.Path) (android.Pa Input: syspropFile, Args: map[string]string{ "headerOutDir": filepath.Dir(headerFile.String()), + "systemOutDir": filepath.Dir(systemHeaderFile.String()), "srcOutDir": filepath.Dir(cppFile.String()), "includeName": syspropFile.Rel() + ".h", }, |