[cmake] Don't try creating an executable when detecting the linker
On most platforms, the linker detection command that we run ends up being something like `clang++ -Wl,-v` or `clang++ -Wl,--version`. This usually fails with a missing reference to `_main` because we don't have any input file. However, when compiling for a target that is implicitly freestanding, the invocation actually succeeds and a dummy `a.out` file is created in the current working directory. This is extremely annoying because it creates a `a.out` file at the root of the monorepo when running CMake configuration from the root. Differential Revision: https://reviews.llvm.org/D125827
Loading
Please sign in to comment