File tree Expand file tree Collapse file tree 4 files changed +13
-9
lines changed Expand file tree Collapse file tree 4 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -317,7 +317,7 @@ if (NOT ENABLE_LINKER_BUILD_ID)
317
317
set (ENABLE_LINKER_BUILD_ID OFF CACHE BOOL "pass --build-id to ld" )
318
318
endif ()
319
319
320
- set (FLANG_DEFAULT_LINKER "" CACHE STRING
320
+ set (FLANG_DEFAULT_LINKER "${CLANG_DEFAULT_LINKER} " CACHE STRING
321
321
"Default linker to use (linker name or absolute path, empty for platform default)" )
322
322
323
323
set (FLANG_DEFAULT_RTLIB "" CACHE STRING
Original file line number Diff line number Diff line change 1
- # ===-- include/flang/Config/config.h.cmake --------------------------------- ===#
2
- #
3
- # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
- # See https://llvm.org/LICENSE.txt for license information.
5
- # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
- #
7
- # ===------------------------------------------------------------------------ ===#
1
+ // ===-- include /flang/Config/config.h.cmake -------------------------------===//
2
+ //
3
+ // Part of the LLVM Project , under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ // ===----------------------------------------------------------------------===//
8
8
9
9
/* This generated file is for internal use. Do not include it from headers. */
10
10
16
16
17
17
#define FLANG_VERSION "${FLANG_VERSION}"
18
18
19
+ #define FLANG_DEFAULT_LINKER "${FLANG_DEFAULT_LINKER}"
20
+
19
21
#endif
20
22
21
23
Original file line number Diff line number Diff line change 77
77
! MINGW-SAME: -lflang_rt.runtime
78
78
! MINGW-STATIC-FLANGRT: "{{.*}}{{\\|/}}libflang_rt.runtime.a"
79
79
80
- ! NOTE: This also matches lld-link (when CLANG_DEFAULT_LINKER =lld) and
80
+ ! NOTE: This also matches lld-link (when FLANG_DEFAULT_LINKER =lld) and
81
81
! any .exe suffix that is added when resolving to the full path of
82
82
! (lld-)link.exe on Windows platforms. The suffix may not be added
83
83
! when the executable is not found or on non-Windows platforms.
Original file line number Diff line number Diff line change 16
16
// ===----------------------------------------------------------------------===//
17
17
18
18
#include " clang/Driver/Driver.h"
19
+ #include " flang/Config/config.h"
19
20
#include " flang/Frontend/CompilerInvocation.h"
20
21
#include " flang/Frontend/TextDiagnosticPrinter.h"
21
22
#include " clang/Basic/Diagnostic.h"
@@ -137,6 +138,7 @@ int main(int argc, const char **argv) {
137
138
llvm::sys::getDefaultTargetTriple (), diags,
138
139
" flang LLVM compiler" );
139
140
theDriver.setTargetAndMode (targetandMode);
141
+ theDriver.setPreferredLinker (FLANG_DEFAULT_LINKER);
140
142
#ifdef FLANG_RUNTIME_F128_MATH_LIB
141
143
theDriver.setFlangF128MathLibrary (FLANG_RUNTIME_F128_MATH_LIB);
142
144
#endif
You can’t perform that action at this time.
0 commit comments