Skip to content

Commit 95218ff

Browse files
committed
[GR-40426] Add static oldnames library for Windows
PullRequest: graal/12470
2 parents 15ab0a2 + 3d1636f commit 95218ff

File tree

7 files changed

+690
-33
lines changed

7 files changed

+690
-33
lines changed

sdk/mx.sdk/vm/exe_link_template.cmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@echo off
22

33
call :getScriptLocation location
4+
set "GRAALVM_ARGUMENT_VECTOR_PROGRAM_NAME=%~0"
45
"%location%<target>" %*
56
exit /b %errorlevel%
67

sulong/mx.sulong/suite.py

Lines changed: 53 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"linux" : {
4949
"amd64" : {
5050
"path": "tests/support.txt",
51-
"sha1": "81177e981eeb52730854e3d763e96015881c3bab",
51+
"sha1": "9b3f44dd60da58735fce6b7346b4b3ef571b768e",
5252
},
5353
"<others>": {
5454
"optional": True,
@@ -67,7 +67,7 @@
6767
"linux" : {
6868
"amd64" : {
6969
"path": "tests/support.txt",
70-
"sha1": "81177e981eeb52730854e3d763e96015881c3bab",
70+
"sha1": "9b3f44dd60da58735fce6b7346b4b3ef571b768e",
7171
},
7272
"<others>": {
7373
"optional": True,
@@ -86,7 +86,7 @@
8686
"linux" : {
8787
"amd64" : {
8888
"path": "tests/support.txt",
89-
"sha1": "81177e981eeb52730854e3d763e96015881c3bab",
89+
"sha1": "9b3f44dd60da58735fce6b7346b4b3ef571b768e",
9090
},
9191
"<others>": {
9292
"optional": True,
@@ -105,7 +105,7 @@
105105
"linux" : {
106106
"amd64" : {
107107
"path": "tests/support.txt",
108-
"sha1": "81177e981eeb52730854e3d763e96015881c3bab",
108+
"sha1": "9b3f44dd60da58735fce6b7346b4b3ef571b768e",
109109
},
110110
"<others>": {
111111
"optional": True,
@@ -124,7 +124,7 @@
124124
"<others>" : {
125125
"amd64" : {
126126
"path": "tests/support.txt",
127-
"sha1": "81177e981eeb52730854e3d763e96015881c3bab",
127+
"sha1": "9b3f44dd60da58735fce6b7346b4b3ef571b768e",
128128
},
129129
"<others>": {
130130
"optional": True,
@@ -138,7 +138,7 @@
138138
"<others>" : {
139139
"aarch64" : {
140140
"path": "tests/support.txt",
141-
"sha1": "81177e981eeb52730854e3d763e96015881c3bab",
141+
"sha1": "9b3f44dd60da58735fce6b7346b4b3ef571b768e",
142142
},
143143
"<others>": {
144144
"optional": True,
@@ -152,7 +152,7 @@
152152
"<others>" : {
153153
"<others>" : {
154154
"path": "tests/support.txt",
155-
"sha1": "81177e981eeb52730854e3d763e96015881c3bab",
155+
"sha1": "9b3f44dd60da58735fce6b7346b4b3ef571b768e",
156156
},
157157
},
158158
"windows" : {
@@ -168,7 +168,7 @@
168168
"<others>" : {
169169
"<others>" : {
170170
"path": "tests/support.txt",
171-
"sha1": "81177e981eeb52730854e3d763e96015881c3bab",
171+
"sha1": "9b3f44dd60da58735fce6b7346b4b3ef571b768e",
172172
},
173173
},
174174
"windows" : {
@@ -178,6 +178,22 @@
178178
},
179179
},
180180
},
181+
# This is a dummy library for disabling tests that won't compile because of missing GNU make.
182+
"WINDOWS_SUPPORT" : {
183+
"os_arch" : {
184+
"windows" : {
185+
"<others>" : {
186+
"path": "tests/support.txt",
187+
"sha1": "9b3f44dd60da58735fce6b7346b4b3ef571b768e",
188+
},
189+
},
190+
"<others>" : {
191+
"<others>": {
192+
"optional": True,
193+
}
194+
},
195+
},
196+
},
181197
},
182198

183199
"projects" : {
@@ -843,6 +859,33 @@
843859
},
844860
"license" : "BSD-new",
845861
},
862+
863+
"com.oracle.truffle.llvm.libraries.oldnames" : {
864+
"subDir" : "projects",
865+
"class" : "CMakeNinjaProject",
866+
# NinjaBuildTask uses only 1 job otherwise
867+
"max_jobs" : "8",
868+
"vpath" : True,
869+
"ninja_targets" : [
870+
"oldnames",
871+
],
872+
"results" : [
873+
"<staticlib:oldnames>",
874+
],
875+
"buildDependencies" : [
876+
"WINDOWS_SUPPORT",
877+
"SULONG_BOOTSTRAP_TOOLCHAIN_NO_HOME",
878+
],
879+
"cmakeConfig" : {
880+
"CMAKE_BUILD_TYPE" : "Release",
881+
"CMAKE_C_COMPILER" : "<path:SULONG_BOOTSTRAP_TOOLCHAIN_NO_HOME>/bin/<cmd:clang>",
882+
"CMAKE_CXX_COMPILER" : "<path:SULONG_BOOTSTRAP_TOOLCHAIN_NO_HOME>/bin/<cmd:clang>",
883+
"CMAKE_LINKER" : "<path:SULONG_BOOTSTRAP_TOOLCHAIN_NO_HOME>/bin/<cmd:lld-link>",
884+
"CMAKE_AR" : "<path:SULONG_BOOTSTRAP_TOOLCHAIN_NO_HOME>/bin/<cmd:llvm-ar>",
885+
},
886+
"license" : "BSD-new",
887+
},
888+
846889
"com.oracle.truffle.llvm.libraries.bitcode.libcxx" : {
847890
"subDir" : "projects",
848891
"vpath" : True,
@@ -1164,7 +1207,7 @@
11641207
"com.oracle.truffle.llvm.tests.libc.native" : {
11651208
"subDir" : "tests",
11661209
"class" : "SulongCMakeTestSuite",
1167-
"variants" : ["executable-O0", "toolchain-plain"],
1210+
"variants" : ["toolchain-plain"],
11681211
"cmakeConfig" : {
11691212
"TOOLCHAIN_CLANG" : "<toolchainGetToolPath:native,CC>",
11701213
"TOOLCHAIN_CLANGXX" : "<toolchainGetToolPath:native,CXX>",
@@ -1665,6 +1708,7 @@
16651708
"dependency:com.oracle.truffle.llvm.libraries.bitcode.libcxx/native/bin/*",
16661709
"dependency:com.oracle.truffle.llvm.libraries.bitcode.libcxx/native/lib/*",
16671710
"dependency:com.oracle.truffle.llvm.libraries.native/bin/*",
1711+
"dependency:com.oracle.truffle.llvm.libraries.oldnames/<staticlib:oldnames>",
16681712
"dependency:com.oracle.truffle.llvm.libraries.graalvm.llvm.libs/bin/*",
16691713
],
16701714
},
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#
2+
# Copyright (c) 2022, Oracle and/or its affiliates.
3+
#
4+
# All rights reserved.
5+
#
6+
# Redistribution and use in source and binary forms, with or without modification, are
7+
# permitted provided that the following conditions are met:
8+
#
9+
# 1. Redistributions of source code must retain the above copyright notice, this list of
10+
# conditions and the following disclaimer.
11+
#
12+
# 2. Redistributions in binary form must reproduce the above copyright notice, this list of
13+
# conditions and the following disclaimer in the documentation and/or other materials provided
14+
# with the distribution.
15+
#
16+
# 3. Neither the name of the copyright holder nor the names of its contributors may be used to
17+
# endorse or promote products derived from this software without specific prior written
18+
# permission.
19+
#
20+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
21+
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22+
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23+
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24+
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
25+
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26+
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27+
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
28+
# OF THE POSSIBILITY OF SUCH DAMAGE.
29+
#
30+
31+
cmake_minimum_required(VERSION 3.10)
32+
project(com.oracle.truffle.llvm.libraries.oldnames)
33+
34+
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR})
35+
36+
add_custom_command(OUTPUT oldnames.lib COMMAND ${CMAKE_C_COMPILER} -o oldnames.lib -c ${CMAKE_CURRENT_SOURCE_DIR}/src/oldnames.c DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/oldnames.c)
37+
add_custom_target(oldnames DEPENDS oldnames.lib)

0 commit comments

Comments
 (0)