diff options
author | Colin Cross <ccross@android.com> | 2016-12-07 13:37:42 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2016-12-07 17:35:37 -0800 |
commit | 9b09f248d846104665d02ded05ab8b20c37bc964 (patch) | |
tree | 960b01f178cb3dc2fabfccb9b2060a3ce62781be /cc/androidmk.go | |
parent | 8cc1cb68cd334076948eb1208dc1818de9a61915 (diff) | |
download | build_soong-9b09f248d846104665d02ded05ab8b20c37bc964.tar.gz build_soong-9b09f248d846104665d02ded05ab8b20c37bc964.tar.bz2 build_soong-9b09f248d846104665d02ded05ab8b20c37bc964.zip |
Install symlinks with same suffix and extension as installed file
Move symlink installation into the binaryDecorator so that it can
access the suffix and extension when installing symlinks. Also
consolidates the symlink and symlink_preferred_arch handling.
Test: m -j clang, ls -l out/host/windows-x86/bin/clang++.exe
Change-Id: I1204afb71fac87b276bd6b625b52ee21274855a0
Diffstat (limited to 'cc/androidmk.go')
-rw-r--r-- | cc/androidmk.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cc/androidmk.go b/cc/androidmk.go index 709ac59b..380babcb 100644 --- a/cc/androidmk.go +++ b/cc/androidmk.go @@ -140,6 +140,11 @@ func (binary *binaryDecorator) AndroidMk(ctx AndroidMkContext, ret *android.Andr if Bool(binary.Properties.Static_executable) { fmt.Fprintln(w, "LOCAL_FORCE_STATIC_EXECUTABLE := true") } + + if len(binary.symlinks) > 0 { + fmt.Fprintln(w, "LOCAL_MODULE_SYMLINKS := "+strings.Join(binary.symlinks, " ")) + } + return nil }) } @@ -211,9 +216,6 @@ func (installer *baseInstaller) AndroidMk(ctx AndroidMkContext, ret *android.And fmt.Fprintln(w, "LOCAL_MODULE_SUFFIX := "+filepath.Ext(file)) fmt.Fprintln(w, "LOCAL_MODULE_PATH := $(OUT_DIR)/"+filepath.Clean(dir)) fmt.Fprintln(w, "LOCAL_MODULE_STEM := "+stem) - if len(installer.Properties.Symlinks) > 0 { - fmt.Fprintln(w, "LOCAL_MODULE_SYMLINKS := "+strings.Join(installer.Properties.Symlinks, " ")) - } return nil }) } |