https://pantsbuild.org/ logo
a

aloof-angle-91616

07/12/2019, 4:17 AM
more concretely:
Copy code
@rule(BaseLinker, [NativeToolchain], given=[Platform.darwin])
def select_base_linker_darwin(native_toolchain):
  # TODO(#5663): turn this into LLVM when lld works.
  linker = yield Get(Linker, XCodeCLITools, native_toolchain._xcode_cli_tools)
  yield BaseLinker(linker)


@rule(BaseLinker, [NativeToolchain], given=[Platform.linux])
def select_base_linker_linux(native_toolchain):
  linker = yield Get(Linker, Binutils, native_toolchain._binutils)
  yield BaseLinker(linker)