Skip to content

Commit bb66a3c

Browse files
committed
Use lld to link host binaries.
Buildbot uses and old version of ld, which doesn't work with clang 12. So switch to lld. Bug: 171348143 Test: run build.py. Change-Id: Ibc9868a8ab862116e90037a30cdb2bf1ec2449cf
1 parent dc29026 commit bb66a3c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

config_toml.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,14 @@ def host_config(target):
6666
with open(wrapper_name, 'w') as f:
6767
f.write("""\
6868
#!/bin/sh
69-
{real_cc} $* --target={target} {sysroot_flags}
69+
{real_cc} $* -fuse-ld=lld --target={target} {sysroot_flags}
7070
""".format(real_cc=cc, target=target, sysroot_flags=sysroot_flags))
7171

7272
with open(cxx_wrapper_name, 'w') as f:
7373
f.write("""\
7474
#!/bin/sh
75-
{real_cxx} -I{cxxstd} $* --target={target} {sysroot_flags} {cxx_linker_flags} -stdlib=libc++
75+
{real_cxx} -I{cxxstd} $* -fuse-ld=lld --target={target} {sysroot_flags} {cxx_linker_flags} \
76+
-stdlib=libc++
7677
""".format(real_cxx=cxx, target=target, sysroot_flags=sysroot_flags,
7778
cxxstd=cxxstd,
7879
cxx_linker_flags=cxx_linker_flags))

0 commit comments

Comments
 (0)