Changeset View
Changeset View
Standalone View
Standalone View
contrib/llvm-project/lld/tools/lld/lld.cpp
| Show First 20 Lines • Show All 140 Lines • ▼ Show 20 Lines | static Flavor parseFlavor(std::vector<const char *> &v) { | ||||
| return parseProgname(arg0); | return parseProgname(arg0); | ||||
| } | } | ||||
| /// Universal linker main(). This linker emulates the gnu, darwin, or | /// Universal linker main(). This linker emulates the gnu, darwin, or | ||||
| /// windows linker based on the argv[0] or -flavor option. | /// windows linker based on the argv[0] or -flavor option. | ||||
| static int lldMain(int argc, const char **argv, llvm::raw_ostream &stdoutOS, | static int lldMain(int argc, const char **argv, llvm::raw_ostream &stdoutOS, | ||||
| llvm::raw_ostream &stderrOS, bool exitEarly = true) { | llvm::raw_ostream &stderrOS, bool exitEarly = true) { | ||||
| std::vector<const char *> args(argv, argv + argc); | std::vector<const char *> args(argv, argv + argc); | ||||
| #ifdef __FreeBSD__ | #if 1 | ||||
| /* On FreeBSD we only build the ELF linker. */ | |||||
jrtc27: Given this is the vendored source, why not just #if 1 this? The condition should always be true… | |||||
| return !elf::link(args, exitEarly, stdoutOS, stderrOS); | return !elf::link(args, exitEarly, stdoutOS, stderrOS); | ||||
| #else | #else | ||||
| switch (parseFlavor(args)) { | switch (parseFlavor(args)) { | ||||
| case Gnu: | case Gnu: | ||||
| if (isPETarget(args)) | if (isPETarget(args)) | ||||
| return !mingw::link(args, exitEarly, stdoutOS, stderrOS); | return !mingw::link(args, exitEarly, stdoutOS, stderrOS); | ||||
| return !elf::link(args, exitEarly, stdoutOS, stderrOS); | return !elf::link(args, exitEarly, stdoutOS, stderrOS); | ||||
| case WinLink: | case WinLink: | ||||
| ▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines | |||||
Given this is the vendored source, why not just #if 1 this? The condition should always be true in every situation we build this. Then (combined with my sysctl.h suggestion) you don't need LLVM_BOOTSTRAPPING.