aboutsummaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2018-04-03 11:33:34 -0700
committerChih-Hung Hsieh <chh@google.com>2018-04-12 14:37:35 -0700
commit02b4da53a76b4ba18e3e14588826d7af45ccd6b5 (patch)
tree8e8611f2c424d3db7685e7ad831498c48b63c330 /android
parent18f568f651fdc7fb17f620aab005ae3af882c199 (diff)
downloadbuild_soong-02b4da53a76b4ba18e3e14588826d7af45ccd6b5.tar.gz
build_soong-02b4da53a76b4ba18e3e14588826d7af45ccd6b5.tar.bz2
build_soong-02b4da53a76b4ba18e3e14588826d7af45ccd6b5.zip
Add USE_CLANG_LLD and use_clang_lld.android-o-mr1-iot-preview-8
* USE_CLANG_LLD is unedefined in current builds. * When USE_CLANG_LLD is defined to 'true' or '1', use clang's lld instead of ld or ld.gold. * When lld is enabled: * ld-only flags are not passed to 'lld'. * location_packer is disabled. * Use new lld's --pack-dyn-relocs=android. * When lld does not work: * In Android.mk files use LOCAL_USE_CLANG_LLD := false. * In Android.bp files use use_clang_lld: false. * Only arm, arm64, x86, and x86_64_devices have LLD flags; all other hosts and targets do not call lld yet. Bug: 73768157 Test: make checkbuild and boot Change-Id: I06b8a1e868a600997a7e70fe05c299d751d23d5f
Diffstat (limited to 'android')
-rw-r--r--android/config.go4
-rw-r--r--android/variable.go2
2 files changed, 6 insertions, 0 deletions
diff --git a/android/config.go b/android/config.go
index b89ae488..7122f489 100644
--- a/android/config.go
+++ b/android/config.go
@@ -629,6 +629,10 @@ func (c *config) TargetOpenJDK9() bool {
return c.targetOpenJDK9
}
+func (c *config) UseClangLld() bool {
+ return Bool(c.productVariables.UseClangLld)
+}
+
func (c *config) ClangTidy() bool {
return Bool(c.productVariables.ClangTidy)
}
diff --git a/android/variable.go b/android/variable.go
index ef7d37bb..3eee9887 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -176,6 +176,8 @@ type productVariables struct {
OdmPath *string `json:",omitempty"`
ProductPath *string `json:",omitempty"`
+ UseClangLld *bool `json:",omitempty"`
+
ClangTidy *bool `json:",omitempty"`
TidyChecks *string `json:",omitempty"`