1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

[CMake] Use normalized Windows target triples

Changes the default Windows target triple returned by
GetHostTriple.cmake from the old environment names (which we wanted to
move away from) to newer, normalized ones. This also requires updating
all tests to use the new systems names in constraints.

Differential Revision: https://reviews.llvm.org/D47381

llvm-svn: 339307
This commit is contained in:
Petr Hosek 2018-08-09 02:16:18 +00:00
parent 5413aff078
commit 1cfc2ea35f
35 changed files with 50 additions and 50 deletions

View File

@ -4,15 +4,15 @@
function( get_host_triple var )
if( MSVC )
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
set( value "x86_64-pc-win32" )
set( value "x86_64-pc-windows-msvc" )
else()
set( value "i686-pc-win32" )
set( value "i686-pc-windows-msvc" )
endif()
elseif( MINGW AND NOT MSYS )
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
set( value "x86_64-w64-mingw32" )
set( value "x86_64-w64-windows-gnu" )
else()
set( value "i686-pc-mingw32" )
set( value "i686-pc-windows-gnu" )
endif()
else( MSVC )
set(config_guess ${LLVM_MAIN_SRC_DIR}/cmake/config.guess)

View File

@ -4,7 +4,7 @@
#
# CHECK-NOT: .loc 1 0
# CHECK: .cfi_def_cfa_offset
# UNSUPPORTED: cygwin,mingw32,win32,x86_64-pc-windows-gnu
# UNSUPPORTED: cygwin,windows-gnu,windows-msvc
--- |
; ModuleID = 'no-cfi-loc.ll'

View File

@ -1,6 +1,6 @@
; REQUIRES: cxx-shared-library
; RUN: %lli -relocation-model=pic -code-model=large %s
; XFAIL: cygwin, win32, mingw, mips-, mipsel-, i686, i386, aarch64, arm
; XFAIL: cygwin, windows-msvc, windows-gnu, mips-, mipsel-, i686, i386, aarch64, arm
declare i8* @__cxa_allocate_exception(i64)
declare void @__cxa_throw(i8*, i8*, i8*)
declare i32 @__gxx_personality_v0(...)

View File

@ -1,6 +1,6 @@
; REQUIRES: cxx-shared-library
; RUN: %lli %s
; XFAIL: arm, cygwin, win32, mingw
; XFAIL: arm, cygwin, windows-msvc, windows-gnu
declare i8* @__cxa_allocate_exception(i64)
declare void @__cxa_throw(i8*, i8*, i8*)
declare i32 @__gxx_personality_v0(...)

View File

@ -1,6 +1,6 @@
; REQUIRES: cxx-shared-library
; RUN: %lli -extra-module=%p/Inputs/multi-module-eh-b.ll %s
; XFAIL: arm, cygwin, win32, mingw
; XFAIL: arm, cygwin, windows-msvc, windows-gnu
declare i8* @__cxa_allocate_exception(i64)
declare void @__cxa_throw(i8*, i8*, i8*)
declare i32 @__gxx_personality_v0(...)

View File

@ -1,5 +1,5 @@
; RUN: %lli -extra-module=%p/Inputs/cross-module-b.ll -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
; XFAIL: mingw32,win32
; XFAIL: windows-gnu,windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,6 +1,6 @@
; REQUIRES: cxx-shared-library
; RUN: %lli -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s
; XFAIL: arm, cygwin, win32, mingw
; XFAIL: arm, cygwin, windows-msvc, windows-gnu
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
declare i8* @__cxa_allocate_exception(i64)

View File

@ -1,5 +1,5 @@
; RUN: %lli -extra-module=%p/Inputs/multi-module-b.ll -extra-module=%p/Inputs/multi-module-c.ll -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
; XFAIL: mingw32,win32
; XFAIL: windows-gnu,windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,5 +1,5 @@
; RUN: %lli -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
; XFAIL: mingw32,win32
; XFAIL: windows-gnu,windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,5 +1,5 @@
; RUN: %lli -remote-mcjit -disable-lazy-compilation=false -mcjit-remote-process=lli-child-target%exeext %s
; XFAIL: mingw32,win32
; XFAIL: windows-gnu,windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,5 +1,5 @@
; RUN: %lli -remote-mcjit -O0 -disable-lazy-compilation=false -mcjit-remote-process=lli-child-target%exeext %s
; XFAIL: mingw32,win32
; XFAIL: windows-gnu,windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,5 +1,5 @@
; RUN: %lli -remote-mcjit -O0 -mcjit-remote-process=lli-child-target%exeext %s
; XFAIL: mingw32,win32
; XFAIL: windows-gnu,windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,5 +1,5 @@
; RUN: %lli -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
; XFAIL: mingw32,win32
; XFAIL: windows-gnu,windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,5 +1,5 @@
; RUN: %lli -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
; XFAIL: mingw32,win32
; XFAIL: windows-gnu,windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,6 +1,6 @@
; RUN: %lli -remote-mcjit -mcjit-remote-process=lli-child-target%exeext \
; RUN: -relocation-model=pic -code-model=small %s > /dev/null
; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, mingw32, win32
; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, windows-gnu, windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,5 +1,5 @@
; RUN: %lli -remote-mcjit -O0 -mcjit-remote-process=lli-child-target%exeext %s
; XFAIL: mingw32,win32
; XFAIL: windows-gnu,windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,6 +1,6 @@
; RUN: %lli -remote-mcjit -mcjit-remote-process=lli-child-target%exeext \
; RUN: -O0 -relocation-model=pic -code-model=small %s
; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, mingw32, win32
; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, windows-gnu, windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,6 +1,6 @@
; REQUIRES: cxx-shared-library
; RUN: %lli -jit-kind=orc-mcjit -relocation-model=pic -code-model=large %s
; XFAIL: cygwin, win32, mingw, mips-, mipsel-, i686, i386, aarch64, arm
; XFAIL: cygwin, windows-msvc, windows-gnu, mips-, mipsel-, i686, i386, aarch64, arm
declare i8* @__cxa_allocate_exception(i64)
declare void @__cxa_throw(i8*, i8*, i8*)
declare i32 @__gxx_personality_v0(...)

View File

@ -1,6 +1,6 @@
; REQUIRES: cxx-shared-library
; RUN: %lli -jit-kind=orc-mcjit %s
; XFAIL: arm, cygwin, win32, mingw
; XFAIL: arm, cygwin, windows-msvc, windows-gnu
declare i8* @__cxa_allocate_exception(i64)
declare void @__cxa_throw(i8*, i8*, i8*)
declare i32 @__gxx_personality_v0(...)

View File

@ -1,6 +1,6 @@
; REQUIRES: cxx-shared-library
; RUN: %lli -jit-kind=orc-mcjit -extra-module=%p/Inputs/multi-module-eh-b.ll %s
; XFAIL: arm, cygwin, win32, mingw
; XFAIL: arm, cygwin, windows-msvc, windows-gnu
declare i8* @__cxa_allocate_exception(i64)
declare void @__cxa_throw(i8*, i8*, i8*)
declare i32 @__gxx_personality_v0(...)

View File

@ -1,5 +1,5 @@
; RUN: %lli -jit-kind=orc-mcjit -extra-module=%p/Inputs/cross-module-b.ll -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
; XFAIL: mingw32,win32
; XFAIL: windows-gnu,windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,6 +1,6 @@
; REQUIRES: cxx-shared-library
; RUN: %lli -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s
; XFAIL: arm, cygwin, win32, mingw
; XFAIL: arm, cygwin, windows-msvc, windows-gnu
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
declare i8* @__cxa_allocate_exception(i64)

View File

@ -1,5 +1,5 @@
; RUN: %lli -jit-kind=orc-mcjit -extra-module=%p/Inputs/multi-module-b.ll -extra-module=%p/Inputs/multi-module-c.ll -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
; XFAIL: mingw32,win32
; XFAIL: windows-gnu,windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,5 +1,5 @@
; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
; XFAIL: mingw32,win32
; XFAIL: windows-gnu,windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,5 +1,5 @@
; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -disable-lazy-compilation=false -mcjit-remote-process=lli-child-target%exeext %s
; XFAIL: mingw32,win32
; XFAIL: windows-gnu,windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,5 +1,5 @@
; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -O0 -disable-lazy-compilation=false -mcjit-remote-process=lli-child-target%exeext %s
; XFAIL: mingw32,win32
; XFAIL: windows-gnu,windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,5 +1,5 @@
; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -O0 -mcjit-remote-process=lli-child-target%exeext %s
; XFAIL: mingw32,win32
; XFAIL: windows-gnu,windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,5 +1,5 @@
; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
; XFAIL: mingw32,win32
; XFAIL: windows-gnu,windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,5 +1,5 @@
; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
; XFAIL: mingw32,win32
; XFAIL: windows-gnu,windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,6 +1,6 @@
; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext \
; RUN: -relocation-model=pic -code-model=small %s > /dev/null
; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, mingw32, win32
; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, windows-gnu, windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,5 +1,5 @@
; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -O0 -mcjit-remote-process=lli-child-target%exeext %s
; XFAIL: mingw32,win32
; XFAIL: windows-gnu,windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,6 +1,6 @@
; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext \
; RUN: -O0 -relocation-model=pic -code-model=small %s
; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, mingw32, win32
; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, windows-gnu, windows-msvc
; UNSUPPORTED: powerpc64-unknown-linux-gnu
; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed

View File

@ -1,5 +1,5 @@
; REQUIRES: shell
; XFAIL: mingw32
; XFAIL: windows-gnu
; RUN: umask 000
; RUN: rm -f %t.000

View File

@ -98,15 +98,15 @@ lli_args = []
# we don't support COFF in MCJIT well enough for the tests, force ELF format on
# Windows. FIXME: the process target triple should be used here, but this is
# difficult to obtain on Windows.
if re.search(r'cygwin|mingw32|windows-gnu|windows-msvc|win32', config.host_triple):
if re.search(r'cygwin|windows-gnu|windows-msvc', config.host_triple):
lli_args = ['-mtriple=' + config.host_triple + '-elf']
llc_args = []
# Similarly, have a macro to use llc with DWARF even when the host is win32.
if re.search(r'win32', config.target_triple):
# Similarly, have a macro to use llc with DWARF even when the host is Windows
if re.search(r'windows-msvc', config.target_triple):
llc_args = [' -mtriple=' +
config.target_triple.replace('-win32', '-mingw32')]
config.target_triple.replace('-msvc', '-gnu')]
# Provide the path to asan runtime lib if available. On darwin, this lib needs
# to be loaded via DYLD_INSERT_LIBRARIES before libLTO.dylib in case the files
@ -312,7 +312,7 @@ if 'darwin' == sys.platform:
sysctl_cmd.wait()
# .debug_frame is not emitted for targeting Windows x64.
if not re.match(r'^x86_64.*-(mingw32|windows-gnu|win32)', config.target_triple):
if not re.match(r'^x86_64.*-(windows-gnu|windows-msvc)', config.target_triple):
config.available_features.add('debug_frame')
if config.have_libxar:

View File

@ -88,7 +88,7 @@ class LLVMConfig(object):
'ASAN_OPTIONS', 'detect_leaks=1', append_path=True)
if re.match(r'^x86_64.*-linux', target_triple):
features.add('x86_64-linux')
if re.match(r'.*-win32$', target_triple):
if re.match(r'.*-windows-msvc$', target_triple):
features.add('target-windows')
use_gmalloc = lit_config.params.get('use_gmalloc', None)
@ -236,10 +236,10 @@ class LLVMConfig(object):
if not m:
self.lit_config.fatal(
"Could not turn '%s' into Itanium ABI triple" % triple)
if m.group(3).lower() != 'win32':
# All non-win32 triples use the Itanium ABI.
if m.group(3).lower() != 'windows':
# All non-windows triples use the Itanium ABI.
return triple
return m.group(1) + '-' + m.group(2) + '-mingw32'
return m.group(1) + '-' + m.group(2) + '-' + m.group(3) + '-gnu'
def make_msabi_triple(self, triple):
m = re.match(r'(\w+)-(\w+)-(\w+)', triple)
@ -249,14 +249,14 @@ class LLVMConfig(object):
isa = m.group(1).lower()
vendor = m.group(2).lower()
os = m.group(3).lower()
if os == 'win32':
# If the OS is win32, we're done.
if os == 'windows' and re.match(r'.*-msvc$', triple):
# If the OS is windows and environment is msvc, we're done.
return triple
if isa.startswith('x86') or isa == 'amd64' or re.match(r'i\d86', isa):
# For x86 ISAs, adjust the OS.
return isa + '-' + vendor + '-win32'
# -win32 is not supported for non-x86 targets; use a default.
return 'i686-pc-win32'
return isa + '-' + vendor + '-windows-msvc'
# -msvc is not supported for non-x86 targets; use a default.
return 'i686-pc-windows-msvc'
def add_tool_substitutions(self, tools, search_dirs=None):
if not search_dirs: