[pkg-d-commits] [ldc] 12/12: ltsmaster - Fix lit tests for ARM (#1979)
Matthias Klumpp
mak at moszumanska.debian.org
Sun Apr 23 22:35:57 UTC 2017
This is an automated email from the git hooks/post-receive script.
mak pushed a commit to annotated tag v0.17.3
in repository ldc.
commit 757797ae7790bc505a092376a01a41bf29bc8c3c
Author: Dan Olson <smolt at users.noreply.github.com>
Date: Tue Jan 24 12:16:42 2017 -0800
ltsmaster - Fix lit tests for ARM (#1979)
---
tests/ir/asm_output.d | 5 ++---
tests/ir/attr_target_x86.d | 5 +++--
tests/ir/lit.site.cfg.in | 8 +++++++-
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/tests/ir/asm_output.d b/tests/ir/asm_output.d
index 701446e..0fdba81 100644
--- a/tests/ir/asm_output.d
+++ b/tests/ir/asm_output.d
@@ -4,7 +4,6 @@
int main() {
return 42;
// Try to keep these very simple checks independent of architecture:
-// LLVM: ret i32 42
-// ASM: $42
-// ASM: ret
+// LLVM: ret i32 42
+// ASM: {{(\$|#|.long )}}42
}
diff --git a/tests/ir/attr_target_x86.d b/tests/ir/attr_target_x86.d
index e83facf..ec3d3ee 100644
--- a/tests/ir/attr_target_x86.d
+++ b/tests/ir/attr_target_x86.d
@@ -1,9 +1,10 @@
// Tests @target attribute for x86
// REQUIRES: atleast_llvm307
+// REQUIRES: target_X86
-// RUN: %ldc -O -c -mcpu=i386 -mtriple i386-linux-gnu -output-ll -of=%t.ll %s && FileCheck %s --check-prefix LLVM < %t.ll
-// RUN: %ldc -O -c -mcpu=i386 -mtriple i386-linux-gnu -output-s -of=%t.s %s && FileCheck %s --check-prefix ASM < %t.s
+// RUN: %ldc -O -c -mcpu=i386 -mtriple=i386-linux-gnu -output-ll -of=%t.ll %s && FileCheck %s --check-prefix LLVM < %t.ll
+// RUN: %ldc -O -c -mcpu=i386 -mtriple=i386-linux-gnu -output-s -of=%t.s %s && FileCheck %s --check-prefix ASM < %t.s
import ldc.attributes;
diff --git a/tests/ir/lit.site.cfg.in b/tests/ir/lit.site.cfg.in
index 498f53b..92f7006 100644
--- a/tests/ir/lit.site.cfg.in
+++ b/tests/ir/lit.site.cfg.in
@@ -3,12 +3,13 @@ import os
import sys
import platform
-## Autogenerated paths by cmake:
+## Auto-initialized variables by cmake:
config.ldc2_bin = "@LDC2_BIN@"
config.ldc2_bin_dir = "@LDC2_BIN_DIR@"
config.test_source_root = "@TESTS_IR_DIR@"
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
config.llvm_version = @LDC_LLVM_VER@
+config.llvm_targetsstr = "@LLVM_TARGETS_TO_BUILD@"
config.name = 'LLVM IR codegen'
@@ -33,6 +34,11 @@ for version in range(305, config.llvm_version+1):
# Define OS as available feature (Windows, Darwin, Linux)
config.available_features.add(platform.system())
+# Define available features based on what LLVM can target
+# Examples: 'target_X86', 'target_ARM', 'target_PowerPC', 'target_AArch64'
+for t in config.llvm_targetsstr.split(';'):
+ config.available_features.add('target_' + t)
+
config.target_triple = '(unused)'
# test_exec_root: The root path where tests should be run.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git
More information about the pkg-d-commits
mailing list