mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 10:58:11 +08:00
[flang] Remove extra space added with --dependent-lib option
This patch fixes a bug with the --dependent-lib option where an extra space is added to the directive causing linking to fail.
This commit is contained in:
@@ -260,7 +260,7 @@ static void addDepdendentLibs(mlir::ModuleOp &mlirModule,
|
||||
auto builder = mlir::OpBuilder(mlirModule.getRegion());
|
||||
for (const std::string &lib : libs) {
|
||||
builder.create<mlir::LLVM::LinkerOptionsOp>(
|
||||
mlirModule.getLoc(), builder.getStrArrayAttr({"/DEFAULTLIB:", lib}));
|
||||
mlirModule.getLoc(), builder.getStrArrayAttr({"/DEFAULTLIB:" + lib}));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
! REDEFINE: %{triple} = aarch64-apple-darwin
|
||||
! RUN: not %{compile} | FileCheck %s --check-prefixes=CHECK-NOWIN
|
||||
|
||||
! CHECK: llvm.linker_options ["/DEFAULTLIB:", "libtest"]
|
||||
! CHECK: llvm.linker_options ["/DEFAULTLIB:libtest"]
|
||||
program test
|
||||
end program test
|
||||
! CHECK-NOWIN: --dependent-lib is only supported on Windows
|
||||
|
||||
Reference in New Issue
Block a user