Move lld.exe (windows) and add dependent library libwinpthread-1.dll

Move lld.exe to lld-bin directory; add lld-bin/libwinpthread-1.dll; add
trampoline.

Best practice is to ship necessary libraries of expected versions along
with build tools, rather than requiring them to be found elsewhere.

lld.exe depends on libwinpthread-1.dll and windows looks for it in the
same directory as lld.exe.  Unfortunately, there's already a 32-bit
libwinpthread-1.dll at the tool root (used by 32-bit executables at
the tool root), and lld.exe is a 64-bit executable, so it needs its own
directory and its own library.

In the old location of lld.exe, we add a trampoline executable (a build
artifact) in lld-bin; this means Gradle, which invokes lld.exe in the old
location, does not have to change.

Bug: 148267171
Bug: 142590626
Bug: 144040336

Test: (gLinux) m TARGET_PRODUCT=sdk_phone_armv7 TARGET_BUILD_VARIANT=userdebug sdk dist sdk_repo
      (gLinux) m TARGET_PRODUCT=sdk_phone_armv7 TARGET_BUILD_VARIANT=userdebug win_sdk dist sdk_repo

Merged-In: Ice6710ed204a25d09ac596207c02b8b99ca95b8b
Change-Id: Ice6710ed204a25d09ac596207c02b8b99ca95b8b
(cherry picked from commit 24e52959d7)
This commit is contained in:
David Gross
2020-03-02 17:40:16 -08:00
parent e3e67a8212
commit 7fe8024a20
2 changed files with 8 additions and 1 deletions

View File

@@ -142,7 +142,13 @@ rm build-tools/${PLATFORM_NAME}/lib64/libc++.so.1
rm build-tools/${PLATFORM_NAME}/lld rm build-tools/${PLATFORM_NAME}/lld
rm build-tools/${PLATFORM_NAME}/lld-bin/lld rm build-tools/${PLATFORM_NAME}/lld-bin/lld
prebuilts/sdk/tools/windows/bin/lld.exe strip build-tools/${PLATFORM_NAME}/lld.exe
# lld linker trampoline (invokes actual lld linker at lld-bin/lld.exe)
bin/lld.exe strip build-tools/${PLATFORM_NAME}/lld.exe
# actual lld linker, and dependent library
prebuilts/sdk/tools/windows/bin/lld.exe strip build-tools/${PLATFORM_NAME}/lld-bin/lld.exe
prebuilts/sdk/tools/windows/bin/lib64/libwinpthread-1.dll strip build-tools/${PLATFORM_NAME}/lld-bin/libwinpthread-1.dll
dalvik/dx/etc/mainDexClasses.bat build-tools/${PLATFORM_NAME}/mainDexClasses.bat dalvik/dx/etc/mainDexClasses.bat build-tools/${PLATFORM_NAME}/mainDexClasses.bat

View File

@@ -35,6 +35,7 @@ WIN_TARGETS := \
fastboot \ fastboot \
hprof-conv \ hprof-conv \
libaapt2_jni \ libaapt2_jni \
lld \
llvm-rs-cc \ llvm-rs-cc \
sqlite3 \ sqlite3 \
zipalign \ zipalign \