diff options
author | Dan Willemsen <dwillemsen@google.com> | 2016-06-10 17:20:30 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2016-06-10 17:20:30 -0700 |
commit | 7517ed0b467ccb4a06bfdd5147c3811daf4814e6 (patch) | |
tree | f784d18f86fafdd4b0a86aaad298e317d689f373 /cc | |
parent | d20b36be5d5cad88a7dc627da83459de36e39c6e (diff) | |
download | build_soong-7517ed0b467ccb4a06bfdd5147c3811daf4814e6.tar.gz build_soong-7517ed0b467ccb4a06bfdd5147c3811daf4814e6.tar.bz2 build_soong-7517ed0b467ccb4a06bfdd5147c3811daf4814e6.zip |
Export strip information to Make
Change-Id: I3c69451a505ac2b97f3112050acc4b64b1cd7394
Diffstat (limited to 'cc')
-rw-r--r-- | cc/androidmk.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cc/androidmk.go b/cc/androidmk.go index 4e35f0ee..499736dc 100644 --- a/cc/androidmk.go +++ b/cc/androidmk.go @@ -79,6 +79,8 @@ func (library *baseLinker) AndroidMk(ret *android.AndroidMkData) { func (library *libraryLinker) AndroidMk(ret *android.AndroidMkData) { library.baseLinker.AndroidMk(ret) + library.stripper.AndroidMk(ret) + ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) error { var exportedIncludes []string for _, flag := range library.exportedFlags() { @@ -110,6 +112,8 @@ func (object *objectLinker) AndroidMk(ret *android.AndroidMkData) { } func (binary *binaryLinker) AndroidMk(ret *android.AndroidMkData) { + binary.stripper.AndroidMk(ret) + ret.Class = "EXECUTABLES" ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) error { fmt.Fprintln(w, "LOCAL_CXX_STL := none") @@ -137,6 +141,18 @@ func (library *toolchainLibraryLinker) AndroidMk(ret *android.AndroidMkData) { }) } +func (stripper *stripper) AndroidMk(ret *android.AndroidMkData) { + ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) error { + if stripper.StripProperties.Strip.None { + fmt.Fprintln(w, "LOCAL_STRIP_MODULE := false") + } else if stripper.StripProperties.Strip.Keep_symbols { + fmt.Fprintln(w, "LOCAL_STRIP_MODULE := keep_symbols") + } + + return nil + }) +} + func (installer *baseInstaller) AndroidMk(ret *android.AndroidMkData) { ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) error { path := installer.path.RelPathString() |