llvm.org GIT mirror llvm / 13ced78
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339307 91177308-0d34-0410-b5e6-96231b3b80d8 Petr Hosek 1 year, 3 months ago
35 changed file(s) with 50 addition(s) and 50 deletion(s). Raw diff Collapse all Expand all
33 function( get_host_triple var )
44 if( MSVC )
55 if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
6 set( value "x86_64-pc-win32" )
6 set( value "x86_64-pc-windows-msvc" )
77 else()
8 set( value "i686-pc-win32" )
8 set( value "i686-pc-windows-msvc" )
99 endif()
1010 elseif( MINGW AND NOT MSYS )
1111 if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
12 set( value "x86_64-w64-mingw32" )
12 set( value "x86_64-w64-windows-gnu" )
1313 else()
14 set( value "i686-pc-mingw32" )
14 set( value "i686-pc-windows-gnu" )
1515 endif()
1616 else( MSVC )
1717 set(config_guess ${LLVM_MAIN_SRC_DIR}/cmake/config.guess)
33 #
44 # CHECK-NOT: .loc 1 0
55 # CHECK: .cfi_def_cfa_offset
6 # UNSUPPORTED: cygwin,mingw32,win32,x86_64-pc-windows-gnu
6 # UNSUPPORTED: cygwin,windows-gnu,windows-msvc
77
88 --- |
99 ; ModuleID = 'no-cfi-loc.ll'
0 ; REQUIRES: cxx-shared-library
11 ; RUN: %lli -relocation-model=pic -code-model=large %s
2 ; XFAIL: cygwin, win32, mingw, mips-, mipsel-, i686, i386, aarch64, arm
2 ; XFAIL: cygwin, windows-msvc, windows-gnu, mips-, mipsel-, i686, i386, aarch64, arm
33 declare i8* @__cxa_allocate_exception(i64)
44 declare void @__cxa_throw(i8*, i8*, i8*)
55 declare i32 @__gxx_personality_v0(...)
0 ; REQUIRES: cxx-shared-library
11 ; RUN: %lli %s
2 ; XFAIL: arm, cygwin, win32, mingw
2 ; XFAIL: arm, cygwin, windows-msvc, windows-gnu
33 declare i8* @__cxa_allocate_exception(i64)
44 declare void @__cxa_throw(i8*, i8*, i8*)
55 declare i32 @__gxx_personality_v0(...)
0 ; REQUIRES: cxx-shared-library
11 ; RUN: %lli -extra-module=%p/Inputs/multi-module-eh-b.ll %s
2 ; XFAIL: arm, cygwin, win32, mingw
2 ; XFAIL: arm, cygwin, windows-msvc, windows-gnu
33 declare i8* @__cxa_allocate_exception(i64)
44 declare void @__cxa_throw(i8*, i8*, i8*)
55 declare i32 @__gxx_personality_v0(...)
0 ; 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
1 ; XFAIL: mingw32,win32
1 ; XFAIL: windows-gnu,windows-msvc
22 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
33 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
44
0 ; REQUIRES: cxx-shared-library
11 ; RUN: %lli -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s
2 ; XFAIL: arm, cygwin, win32, mingw
2 ; XFAIL: arm, cygwin, windows-msvc, windows-gnu
33 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
44 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
55 declare i8* @__cxa_allocate_exception(i64)
0 ; 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
1 ; XFAIL: mingw32,win32
1 ; XFAIL: windows-gnu,windows-msvc
22 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
33 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
44
0 ; RUN: %lli -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
1 ; XFAIL: mingw32,win32
1 ; XFAIL: windows-gnu,windows-msvc
22 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
33 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
44
0 ; RUN: %lli -remote-mcjit -disable-lazy-compilation=false -mcjit-remote-process=lli-child-target%exeext %s
1 ; XFAIL: mingw32,win32
1 ; XFAIL: windows-gnu,windows-msvc
22 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
33 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
44
0 ; RUN: %lli -remote-mcjit -O0 -disable-lazy-compilation=false -mcjit-remote-process=lli-child-target%exeext %s
1 ; XFAIL: mingw32,win32
1 ; XFAIL: windows-gnu,windows-msvc
22 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
33 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
44
0 ; RUN: %lli -remote-mcjit -O0 -mcjit-remote-process=lli-child-target%exeext %s
1 ; XFAIL: mingw32,win32
1 ; XFAIL: windows-gnu,windows-msvc
22 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
33 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
44
0 ; RUN: %lli -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
1 ; XFAIL: mingw32,win32
1 ; XFAIL: windows-gnu,windows-msvc
22 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
33 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
44
0 ; RUN: %lli -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
1 ; XFAIL: mingw32,win32
1 ; XFAIL: windows-gnu,windows-msvc
22 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
33 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
44
0 ; RUN: %lli -remote-mcjit -mcjit-remote-process=lli-child-target%exeext \
11 ; RUN: -relocation-model=pic -code-model=small %s > /dev/null
2 ; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, mingw32, win32
2 ; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, windows-gnu, windows-msvc
33 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
44 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
55
0 ; RUN: %lli -remote-mcjit -O0 -mcjit-remote-process=lli-child-target%exeext %s
1 ; XFAIL: mingw32,win32
1 ; XFAIL: windows-gnu,windows-msvc
22 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
33 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
44
0 ; RUN: %lli -remote-mcjit -mcjit-remote-process=lli-child-target%exeext \
11 ; RUN: -O0 -relocation-model=pic -code-model=small %s
2 ; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, mingw32, win32
2 ; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, windows-gnu, windows-msvc
33 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
44 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
55
0 ; REQUIRES: cxx-shared-library
11 ; RUN: %lli -jit-kind=orc-mcjit -relocation-model=pic -code-model=large %s
2 ; XFAIL: cygwin, win32, mingw, mips-, mipsel-, i686, i386, aarch64, arm
2 ; XFAIL: cygwin, windows-msvc, windows-gnu, mips-, mipsel-, i686, i386, aarch64, arm
33 declare i8* @__cxa_allocate_exception(i64)
44 declare void @__cxa_throw(i8*, i8*, i8*)
55 declare i32 @__gxx_personality_v0(...)
0 ; REQUIRES: cxx-shared-library
11 ; RUN: %lli -jit-kind=orc-mcjit %s
2 ; XFAIL: arm, cygwin, win32, mingw
2 ; XFAIL: arm, cygwin, windows-msvc, windows-gnu
33 declare i8* @__cxa_allocate_exception(i64)
44 declare void @__cxa_throw(i8*, i8*, i8*)
55 declare i32 @__gxx_personality_v0(...)
0 ; REQUIRES: cxx-shared-library
11 ; RUN: %lli -jit-kind=orc-mcjit -extra-module=%p/Inputs/multi-module-eh-b.ll %s
2 ; XFAIL: arm, cygwin, win32, mingw
2 ; XFAIL: arm, cygwin, windows-msvc, windows-gnu
33 declare i8* @__cxa_allocate_exception(i64)
44 declare void @__cxa_throw(i8*, i8*, i8*)
55 declare i32 @__gxx_personality_v0(...)
0 ; 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
1 ; XFAIL: mingw32,win32
1 ; XFAIL: windows-gnu,windows-msvc
22 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
33 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
44
0 ; REQUIRES: cxx-shared-library
11 ; RUN: %lli -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s
2 ; XFAIL: arm, cygwin, win32, mingw
2 ; XFAIL: arm, cygwin, windows-msvc, windows-gnu
33 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
44 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
55 declare i8* @__cxa_allocate_exception(i64)
0 ; 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
1 ; XFAIL: mingw32,win32
1 ; XFAIL: windows-gnu,windows-msvc
22 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
33 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
44
0 ; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
1 ; XFAIL: mingw32,win32
1 ; XFAIL: windows-gnu,windows-msvc
22 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
33 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
44
0 ; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -disable-lazy-compilation=false -mcjit-remote-process=lli-child-target%exeext %s
1 ; XFAIL: mingw32,win32
1 ; XFAIL: windows-gnu,windows-msvc
22 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
33 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
44
0 ; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -O0 -disable-lazy-compilation=false -mcjit-remote-process=lli-child-target%exeext %s
1 ; XFAIL: mingw32,win32
1 ; XFAIL: windows-gnu,windows-msvc
22 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
33 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
44
0 ; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -O0 -mcjit-remote-process=lli-child-target%exeext %s
1 ; XFAIL: mingw32,win32
1 ; XFAIL: windows-gnu,windows-msvc
22 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
33 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
44
0 ; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
1 ; XFAIL: mingw32,win32
1 ; XFAIL: windows-gnu,windows-msvc
22 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
33 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
44
0 ; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s > /dev/null
1 ; XFAIL: mingw32,win32
1 ; XFAIL: windows-gnu,windows-msvc
22 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
33 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
44
0 ; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext \
11 ; RUN: -relocation-model=pic -code-model=small %s > /dev/null
2 ; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, mingw32, win32
2 ; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, windows-gnu, windows-msvc
33 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
44 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
55
0 ; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -O0 -mcjit-remote-process=lli-child-target%exeext %s
1 ; XFAIL: mingw32,win32
1 ; XFAIL: windows-gnu,windows-msvc
22 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
33 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
44
0 ; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext \
11 ; RUN: -O0 -relocation-model=pic -code-model=small %s
2 ; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, mingw32, win32
2 ; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, windows-gnu, windows-msvc
33 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
44 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
55
0 ; REQUIRES: shell
1 ; XFAIL: mingw32
1 ; XFAIL: windows-gnu
22
33 ; RUN: umask 000
44 ; RUN: rm -f %t.000
9797 # we don't support COFF in MCJIT well enough for the tests, force ELF format on
9898 # Windows. FIXME: the process target triple should be used here, but this is
9999 # difficult to obtain on Windows.
100 if re.search(r'cygwin|mingw32|windows-gnu|windows-msvc|win32', config.host_triple):
100 if re.search(r'cygwin|windows-gnu|windows-msvc', config.host_triple):
101101 lli_args = ['-mtriple=' + config.host_triple + '-elf']
102102
103103 llc_args = []
104104
105 # Similarly, have a macro to use llc with DWARF even when the host is win32.
106 if re.search(r'win32', config.target_triple):
105 # Similarly, have a macro to use llc with DWARF even when the host is Windows
106 if re.search(r'windows-msvc', config.target_triple):
107107 llc_args = [' -mtriple=' +
108 config.target_triple.replace('-win32', '-mingw32')]
108 config.target_triple.replace('-msvc', '-gnu')]
109109
110110 # Provide the path to asan runtime lib if available. On darwin, this lib needs
111111 # to be loaded via DYLD_INSERT_LIBRARIES before libLTO.dylib in case the files
311311 sysctl_cmd.wait()
312312
313313 # .debug_frame is not emitted for targeting Windows x64.
314 if not re.match(r'^x86_64.*-(mingw32|windows-gnu|win32)', config.target_triple):
314 if not re.match(r'^x86_64.*-(windows-gnu|windows-msvc)', config.target_triple):
315315 config.available_features.add('debug_frame')
316316
317317 if config.have_libxar:
8787 'ASAN_OPTIONS', 'detect_leaks=1', append_path=True)
8888 if re.match(r'^x86_64.*-linux', target_triple):
8989 features.add('x86_64-linux')
90 if re.match(r'.*-win32$', target_triple):
90 if re.match(r'.*-windows-msvc$', target_triple):
9191 features.add('target-windows')
9292
9393 use_gmalloc = lit_config.params.get('use_gmalloc', None)
235235 if not m:
236236 self.lit_config.fatal(
237237 "Could not turn '%s' into Itanium ABI triple" % triple)
238 if m.group(3).lower() != 'win32':
239 # All non-win32 triples use the Itanium ABI.
238 if m.group(3).lower() != 'windows':
239 # All non-windows triples use the Itanium ABI.
240240 return triple
241 return m.group(1) + '-' + m.group(2) + '-mingw32'
241 return m.group(1) + '-' + m.group(2) + '-' + m.group(3) + '-gnu'
242242
243243 def make_msabi_triple(self, triple):
244244 m = re.match(r'(\w+)-(\w+)-(\w+)', triple)
248248 isa = m.group(1).lower()
249249 vendor = m.group(2).lower()
250250 os = m.group(3).lower()
251 if os == 'win32':
252 # If the OS is win32, we're done.
251 if os == 'windows' and re.match(r'.*-msvc$', triple):
252 # If the OS is windows and environment is msvc, we're done.
253253 return triple
254254 if isa.startswith('x86') or isa == 'amd64' or re.match(r'i\d86', isa):
255255 # For x86 ISAs, adjust the OS.
256 return isa + '-' + vendor + '-win32'
257 # -win32 is not supported for non-x86 targets; use a default.
258 return 'i686-pc-win32'
256 return isa + '-' + vendor + '-windows-msvc'
257 # -msvc is not supported for non-x86 targets; use a default.
258 return 'i686-pc-windows-msvc'
259259
260260 def add_tool_substitutions(self, tools, search_dirs=None):
261261 if not search_dirs: