Skip to content

Commit 17239db

Browse files
committed
Add explicit architecture flag behavior testing
1 parent 75f8917 commit 17239db

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
; RUN: llvm-ml64 -filetype=s %s /Fo - | FileCheck %s --implicit-check-not=error:
2+
; RUN: llvm-ml -m64 -filetype=s %s /Fo - | FileCheck %s --implicit-check-not=error:
3+
4+
.code
5+
6+
xor rax, rax
7+
; CHECK: xor rax, rax
8+
9+
end
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
; RUN: not llvm-ml -filetype=s %s /Fo - 2>&1 | FileCheck %s
2+
; RUN: not llvm-ml -m32 -filetype=s %s /Fo - 2>&1 | FileCheck %s
3+
; RUN: not llvm-ml64 -m32 -filetype=s %s /Fo - 2>&1 | FileCheck %s
4+
5+
.code
6+
7+
; CHECK: :[[# @LINE + 1]]:5: error: register %rax is only available in 64-bit mode
8+
xor rax, rax
9+
10+
end

utils/bazel/llvm-project-overlay/llvm/BUILD.bazel

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5116,6 +5116,14 @@ llvm_driver_cc_binary(
51165116
deps = [":llvm-ml-lib"],
51175117
)
51185118

5119+
genrule(
5120+
name = "gen_llvm-ml64",
5121+
srcs = [":llvm-ml"],
5122+
outs = ["llvm-ml64"],
5123+
cmd = "ln -sf $$(basename $<) $@",
5124+
output_to_bindir = 1,
5125+
)
5126+
51195127
cc_binary(
51205128
name = "llvm-modextract",
51215129
srcs = glob([

0 commit comments

Comments
 (0)