Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gn bootstrap: Explicitly pass -lpthread when linking with --use-custo…
…m-libcxx https://chromium-review.googlesource.com/c/1460187 ("Fix gn build on 'Build From Tarball' bot") together with https://gn-review.googlesource.com/c/gn/+/4000 ("Pass -lpthread when linking instead of -pthread") have caused the GN bootstrap process to fail when --use-custom-libcxx is not used. The reason is that -nodefaultlibs (passed to the compiler when linking with --use-custom-libcxx) causes -pthread to be ignored. To work around that, that GN CL started passing -lpthread so that it was added back to the command-line. However, if we are _not_ using --use-custom-libcxx, the whole process fails because -lpthread is specified at the wrong position in the command-line and the symbols are not resolved correctly. In this CL, make the --use-custom-libcxx build explicitly pass -lpthread to the linker so that we can later go back to passing -pthread in the GN build, as the compiler then knows where to put the right flags in the command line. Bug: 934793 Change-Id: Id8bf242bf461fb5146e1ac28d187082c43fdafbb Reviewed-on: https://chromium-review.googlesource.com/c/1482959 Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Commit-Queue: Nico Weber <thakis@chromium.org> Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Reviewed-by: Nico Weber <thakis@chromium.org> Cr-Commit-Position: refs/heads/master@{#634657}
- Loading branch information