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)
317317  set (ENABLE_LINKER_BUILD_ID OFF  CACHE  BOOL  "pass --build-id to ld" )
318318endif ()
319319
320- set (FLANG_DEFAULT_LINKER ""  CACHE  STRING 
320+ set (FLANG_DEFAULT_LINKER ${CLANG_DEFAULT_LINKER}  CACHE  STRING 
321321  "Default linker to use (linker name or absolute path, empty for platform default)" )
322322
323323set (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+ // ===----------------------------------------------------------------------===// 
88
99/* This generated  file is for internal  use. Do not  include  it from headers. */
1010
1616
1717#define FLANG_VERSION            "${FLANG_VERSION}" 
1818
19+ #define FLANG_DEFAULT_LINKER     "${FLANG_DEFAULT_LINKER}" 
20+ 
1921#endif 
2022
2123
Original file line number Diff line number Diff line change 7777!  MINGW-SAME: -lflang_rt.runtime
7878!  MINGW-STATIC-FLANGRT: "{{.*}}{{\\|/}}libflang_rt.runtime.a"
7979
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
8181!        any .exe suffix that is added when resolving to the full path of
8282!        (lld-)link.exe on Windows platforms. The suffix may not be added
8383!        when the executable is not found or on non-Windows platforms.
Original file line number Diff line number Diff line change 1616// ===----------------------------------------------------------------------===//
1717
1818#include  " clang/Driver/Driver.h" 
19+ #include  " flang/Config/config.h" 
1920#include  " flang/Frontend/CompilerInvocation.h" 
2021#include  " flang/Frontend/TextDiagnosticPrinter.h" 
2122#include  " clang/Basic/Diagnostic.h" 
@@ -138,6 +139,7 @@ int main(int argc, const char **argv) {
138139                                  llvm::sys::getDefaultTargetTriple (), diags,
139140                                  " flang LLVM compiler" 
140141  theDriver.setTargetAndMode (targetandMode);
142+   theDriver.setPreferredLinker (FLANG_DEFAULT_LINKER);
141143#ifdef  FLANG_RUNTIME_F128_MATH_LIB
142144  theDriver.setFlangF128MathLibrary (FLANG_RUNTIME_F128_MATH_LIB);
143145#endif 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments