forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mlir] Add llvm.linker.options operation to the LLVM IR Dialect (llvm…
…#71720) This patch adds a `llvm.linker.options` operation taking a list of strings to pass to the linker when the resulting object file is linked. This is particularly useful on Windows to specify the CRT version to use for this object file.
- Loading branch information
1 parent
cc3f29c
commit 0046e97
Showing
8 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
; RUN: mlir-translate -import-llvm -split-input-file %s | FileCheck %s | ||
|
||
; CHECK: llvm.linker_options ["DEFAULTLIB:", "libcmt"] | ||
!llvm.linker.options = !{!0} | ||
!0 = !{!"DEFAULTLIB:", !"libcmt"} | ||
|
||
; // ----- | ||
|
||
!llvm.linker.options = !{!0, !1, !2} | ||
; CHECK: llvm.linker_options ["DEFAULTLIB:", "libcmt"] | ||
!0 = !{!"DEFAULTLIB:", !"libcmt"} | ||
; CHECK: llvm.linker_options ["DEFAULTLIB:", "libcmtd"] | ||
!1 = !{!"DEFAULTLIB:", !"libcmtd"} | ||
; CHECK: llvm.linker_options ["-lm"] | ||
!2 = !{!"-lm"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters