This is an archive of the discontinued LLVM Phabricator instance.

gn build: Use target OS to control whether to use/depend on llvm-ar.
ClosedPublic

Authored by pcc on Apr 6 2022, 12:48 PM.

Details

Summary

When cross-compiling from Mac to non-Mac, we need to use the just-built
llvm-ar instead of libtool. We're currently doing the right thing
when determining which archiver command to use, but the path to ar
and the toolchain dependencies were being set based on the host OS
(current_os evaluated in host OS toolchain), instead of the target
OS. Fix the problem by looking up current_os inside toolchain_args.

Diff Detail

Event Timeline

pcc created this revision.Apr 6 2022, 12:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2022, 12:48 PM
pcc requested review of this revision.Apr 6 2022, 12:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2022, 12:48 PM
This revision is now accepted and ready to land.Apr 6 2022, 1:38 PM
This revision was landed with ongoing or failed builds.Apr 6 2022, 1:49 PM
This revision was automatically updated to reflect the committed changes.