platform_build_soong/cc
Pirama Arumuga Nainar 6d8c0a50bc Revert "Revert "Enable lld for windows""
This reverts commit 61166dc047.

One difference from the earlier change is that import libraries are now
using the '.lib' extension instead of '.a' to prevent clash with
AdbWinApi.a.

Bug: http://b/110800681

The following flags that the binutils linkers support are not
available in lld for Windows:
  -soname
  --no-undefined
  -rpath

Windows also uses "import libraries", which are stub libraries used only
for linking.  The binutils linkers accepted a DLL and treated them as an
import library.  But lld issues the following error:

  lld-link: error: ...DLL: bad file type. Did you specify a DLL instead
  of an import library?

To resolve this, pass '-out-implib=libFoo.lib' to lld when linking
libFoo.dll to get lld to generate an import library.  Add libFoo.lib as
an implicit output to the 'ld' build rule.

Rewrite the shared libraries when building a library/binary to use the
import library instead of the DLL.  As a side-effect, this also uses the
newly-created AdbWinApi.lib that's alongside
development/host/windows/prebuilt/usb/AdbWinApi.dll

Test: Run Windows tests (go/android-llvm-windows-testing) and check
absence of regressions.  Also check that the following commands pass:
      $ adb.exe devices
      $ fastboot.exe devices

Change-Id: I34e07d345e0207086ac8e8ea12525d8c322b20fd
2019-04-16 16:22:03 -07:00
..
config Do not re-export _Unwind_XXX symbols. 2019-04-11 17:54:48 -07:00
libbuildversion Add dist support to Soong 2018-11-19 15:26:14 -08:00
androidmk.go Add support for no-vendor-variant VNDK 2019-03-21 04:29:24 +00:00
binary.go Revert "Revert "Enable lld for windows"" 2019-04-16 16:22:03 -07:00
builder.go Revert "Revert "Enable lld for windows"" 2019-04-16 16:22:03 -07:00
cc.go Convert yacc to a single RuleBuilder rule 2019-04-15 14:52:05 -07:00
cc_test.go Add support for protoc plugins 2019-04-02 16:38:55 +00:00
check.go
cmakelists.go Remove GCC checks 2018-10-09 02:16:58 +00:00
compdb.go Update compdb to put full path to compiler 2019-01-29 17:27:37 +00:00
compiler.go Convert yacc to a single RuleBuilder rule 2019-04-15 14:52:05 -07:00
coverage.go Include libprofile-extras to all coverage variants 2019-03-29 08:56:42 -07:00
gen.go Convert yacc to a single RuleBuilder rule 2019-04-15 14:52:05 -07:00
gen_stub_libs.py Handle the case when a symbol is annotated with "# apex vndk" 2019-02-08 20:36:26 +09:00
gen_test.go
genrule.go Add support for versioned stubs. 2018-10-30 09:55:48 +09:00
genrule_test.go Allow cc_genrule srcs to vary by architecture 2018-10-23 18:40:37 +00:00
installer.go APEX respects relative_install_path 2019-02-05 21:00:41 +09:00
kernel_headers.go Fix double space in include argument 2018-10-02 11:16:56 -07:00
library.go Revert "Revert "Enable lld for windows"" 2019-04-16 16:22:03 -07:00
library_test.go
linker.go Revert "Revert "Enable lld for windows"" 2019-04-16 16:22:03 -07:00
llndk_library.go Soong: Add synopsis to several modules under the cc package. 2019-04-03 14:43:03 -07:00
lto.go Support LLD ThinLTO cache/threshold option 2019-03-22 21:32:45 -07:00
makevars.go Remove our clang-tidy wrapper 2019-04-04 17:58:00 -07:00
ndk_headers.go Soong: Add synopsis to ndk_* modules. 2019-04-09 18:50:44 -07:00
ndk_library.go Soong: Add synopsis to ndk_* modules. 2019-04-09 18:50:44 -07:00
ndk_prebuilt.go Fix double space in include argument 2018-10-02 11:16:56 -07:00
ndk_sysroot.go Fix package path of android/soong/android pctx 2019-04-04 03:59:34 +00:00
object.go Include libprofile-extras to all coverage variants 2019-03-29 08:56:42 -07:00
pgo.go Turn on new pass manager for PGO projects 2019-03-21 23:43:42 +00:00
prebuilt.go Soong: Add synopsis to cc_prebuilt_* modules. 2019-04-01 17:25:41 +00:00
proto.go Add support for protoc plugins 2019-04-02 16:38:55 +00:00
proto_test.go Skip failing test on mac 2019-04-02 10:02:04 -07:00
pylintrc
rs.go Use prebuilt llvm-rs-cc for unbundled build 2018-11-18 20:58:10 -08:00
sabi.go Remove flags from ClangLibToolingUnknownCflags 2018-10-16 17:52:12 +08:00
sanitize.go Pass -fsanitize-hwaddress-abi=platform when building with hwasan. 2019-03-21 16:22:00 -07:00
stl.go Do not re-export _Unwind_XXX symbols. 2019-04-11 17:54:48 -07:00
strip.go Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules 2018-09-10 23:12:12 -07:00
sysprop.go Create sysprop_library soong module 2019-02-13 23:32:51 +00:00
test.go Soong: Add synopsis to several modules under cc package. 2019-03-25 14:21:29 +00:00
test_data_test.go Replace ctx.ExpandSources with android.PathsForModuleSrc 2019-03-20 19:36:13 +00:00
test_gen_stub_libs.py Handle the case when a symbol is annotated with "# apex vndk" 2019-02-08 20:36:26 +09:00
testing.go Remove libbase dependency of sysprop_library 2019-03-27 17:27:05 +09:00
tidy.go Add support for clang-tidy -warnings-as-errors in Android.bp files 2019-03-26 20:47:08 +00:00
toolchain_library.go Soong: Add synopsis to several modules under the cc package. 2019-04-03 14:43:03 -07:00
util.go Convert yacc to a single RuleBuilder rule 2019-04-15 14:52:05 -07:00
util_test.go Allow cc_prebuilt version suffix to include svn 2018-09-26 10:59:56 +08:00
vendor_public_library.go Soong: Add synopsis to several modules under the cc package. 2019-04-03 14:43:03 -07:00
vndk.go Add support for no-vendor-variant VNDK 2019-03-21 04:29:24 +00:00
vndk_prebuilt.go Soong: Add synopsis to vndk_prebuilt_shared module under cc package. 2019-04-03 09:07:51 -07:00
xom.go XOM dependency check skipping static binaries. 2019-01-31 10:09:13 -08:00