Skip to content

Allow selecting llvm-lipo (and possibly other llvm tools) before the host toolchain equivalents #59552

Closed
@sztomi

Description

@sztomi

In #59535 I noted that the lipo binary is hardcoded in the Darwin driver. In a distribution I build, I can ensure that llvm-lipo is selected if I symlink llvm-lipo to lipo in the install dir, or by putting it into a separate directory, also named lipo and adding a -B argument. This led to a separate discussion about how it would be best to handle this situation. As I understand, the following suggestions emerged:

  1. Add a -fuse-lipo=llvm-lipo flag
  2. Add a more generic -fuse-llvm-darwin-tools flag that opts in to using all the llvm equivalents of the tools in the Xcode toolchain.

In my opinion, option 2 is better if all the llvm tools are production-ready replacements. If not, it would be better to use a singular flag that allows more refined selection of the tools.

Also, the discussion so far was only about llvm-lipo and llvm-libtool-darwin. Which other tools would the more generic flag enable? Would it imply -fuse-ld=lld as well?

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:driver'clang' and 'clang++' user-facing binaries. Not 'clang-cl'

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions