Skip to content

Commit d39c97a

Browse files
committed
[GR-59770] [GR-62951] [GR-63030] Fixes for the NFI Panama backend
PullRequest: graal/20288
2 parents 1e0b993 + f32e509 commit d39c97a

File tree

77 files changed

+115
-2834
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+115
-2834
lines changed

sulong/ci/ci.jsonnet

-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ local sc = (import "ci_common/sulong-common.jsonnet");
6767
$.sulong + $.gate(standalone=true) + sc.labsjdkLatest + sc.linux_amd64 + sc.llvmBundled + sc.requireGMP + sc.requireGCC + sc.gateTags("build,sulongMisc,parser") + $.sulong_test_toolchain + { name: "gate-sulong-misc-parser-jdk-latest-linux-amd64" },
6868
$.sulong + $.gate() + sc.labsjdkLatest + sc.linux_amd64 + sc.llvmBundled + sc.requireGMP + sc.gateTags("build,gcc_c") + { name: "gate-sulong-gcc_c-jdk-latest-linux-amd64", timelimit: "45:00" },
6969
$.sulong + $.gate() + sc.labsjdkLatest + sc.linux_amd64 + sc.llvmBundled + sc.requireGMP + sc.gateTags("build,gcc_cpp") + { name: "gate-sulong-gcc_cpp-jdk-latest-linux-amd64", timelimit: "45:00" },
70-
$.sulong + $.gate() + sc.labsjdkLatest + sc.linux_amd64 + sc.llvmBundled + sc.requireGMP + sc.requireGCC + sc.gateTags("build,gcc_fortran") + { name: "gate-sulong-gcc_fortran-jdk-latest-linux-amd64" },
7170

7271
$.sulong + $.gate() + sc.labsjdkLatest + sc.darwin_amd64 + sc.llvmBundled + sc.gateTags(basicTags) + { name: "gate-sulong-basic-nwcc-llvm-jdk-latest-darwin-amd64", timelimit: "0:45:00", capabilities+: ["ram16gb"] },
7372

sulong/ci/ci_common/sulong-common.jsonnet

-5
Original file line numberDiff line numberDiff line change
@@ -188,16 +188,11 @@ local sulong_deps = common.deps.sulong;
188188
packages+: {
189189
gcc: "==6.1.0",
190190
},
191-
downloads+: {
192-
DRAGONEGG_GCC: { name: "gcc+dragonegg", version: "4.6.4-1", platformspecific: true },
193-
DRAGONEGG_LLVM: { name: "clang+llvm", version: "3.2", platformspecific: true },
194-
},
195191
},
196192

197193
# like requireGCC, but only on linux/amd64, ignored otherwise
198194
optionalGCC:: {
199195
packages+: if self.os == "linux" && self.arch == "amd64" then $.requireGCC.packages else {},
200-
downloads+: if self.os == "linux" && self.arch == "amd64" then $.requireGCC.downloads else {},
201196
},
202197

203198
requireGMP:: {

sulong/cmake/toolchain.cmake

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2022, 2025, Oracle and/or its affiliates.
33
#
44
# All rights reserved.
55
#
@@ -87,3 +87,17 @@ find_tc_ifndef(CMAKE_AR ${SULONG_TOOLCHAIN_BIN}/llvm-ar)
8787
find_tc_ifndef(CMAKE_NM ${SULONG_TOOLCHAIN_BIN}/llvm-nm)
8888

8989
set_ifndef(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
90+
91+
execute_process(
92+
COMMAND ${CMAKE_C_COMPILER} -print-resource-dir
93+
OUTPUT_VARIABLE clang_resource_dir
94+
OUTPUT_STRIP_TRAILING_WHITESPACE)
95+
96+
# convert llvm-dir/lib/clang/18 to just llvm-dir/
97+
get_filename_component(clang_lib_dir ${clang_resource_dir} DIRECTORY)
98+
get_filename_component(clang_lib_dir2 ${clang_lib_dir} DIRECTORY)
99+
get_filename_component(llvm_dir ${clang_lib_dir2} DIRECTORY)
100+
101+
# add file-prefix-map, but not for the "LL" language
102+
# the LL language is used by our test bulid scripts to refer to the llvm-link command, it doesn't understand this option
103+
add_compile_options($<IF:$<COMPILE_LANGUAGE:LL>,,-ffile-prefix-map=${llvm_dir}=LLVM_TOOLCHAIN>)

sulong/docs/contributor/TESTS.md

-25
Original file line numberDiff line numberDiff line change
@@ -156,31 +156,6 @@ Another useful `mx unittest` flag is `--color`, which makes the output easier to
156156
To attach a debugger to Sulong tests, run `mx` with the `-d` argument, e.g.
157157
`mx -d unittest SulongSuite` or `mx -d gate --tags sulong`.
158158

159-
## Fortran
160-
161-
Some of our tests are Fortran files. Make sure you have GCC, G++, and GFortran
162-
in version 4.5, 4.6 or 4.7 available.
163-
164-
On the Mac you can use Homebrew:
165-
166-
brew tap homebrew/versions
167-
brew install gcc46 --with-fortran
168-
brew link --force gmp4
169-
170-
For the Fortran tests you also need to provide
171-
[DragonEgg](http://dragonegg.llvm.org/) 3.2 and Clang 3.2.
172-
173-
[DragonEgg](http://dragonegg.llvm.org/) is a GCC plugin with which we
174-
can use GCC to compile a source language to LLVM IR. Sulong uses
175-
DragonEgg in its test cases to compile Fortran files to LLVM IR.
176-
Sulong also uses DragonEgg for the C/C++ test cases besides Clang to get
177-
additional "free" test cases for a given C/C++ file. DragonEgg requires
178-
a GCC in the aforementioned versions.
179-
180-
- Sulong expects to find Clang 3.2 in `$DRAGONEGG_LLVM/bin`
181-
- Sulong expects to find GCC 4.5, 4.6 or 4.7 in `$DRAGONEGG_GCC/bin`
182-
- Sulong expects to find `dragonegg.so` under `$DRAGONEGG` or in `$DRAGONEGG_GCC/lib`
183-
184159
## Test Exclusion
185160

186161
Not all tests work under all circumstances. Especially external test suites,

sulong/mx.sulong/mx_sulong.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2016, 2024, Oracle and/or its affiliates.
2+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates.
33
#
44
# All rights reserved.
55
#
@@ -94,6 +94,13 @@ def _lib_versioned(arg):
9494

9595
mx_subst.results_substitutions.register_with_arg('libv', _lib_versioned)
9696

97+
def sulong_prefix_path(name):
98+
# name is a CMakeNinjaProject with `symlinkSource: True`
99+
# return the path to the build directory, that also includes the sources
100+
p = mx.project(name)
101+
return p.out_dir
102+
103+
mx_subst.results_substitutions.register_with_arg('sulong_prefix', sulong_prefix_path)
97104

98105
def testLLVMImage(image, imageArgs=None, testFilter=None, libPath=True, test=None, unittestArgs=None):
99106
mx_sulong_gate.testLLVMImage(image, imageArgs, testFilter, libPath, test, unittestArgs)

sulong/mx.sulong/mx_sulong_gate.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2016, 2023, Oracle and/or its affiliates.
2+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates.
33
#
44
# All rights reserved.
55
#
@@ -185,7 +185,6 @@ def _unittest(title, test_suite, tags=None, testClasses=None, unittestArgs=None,
185185
_unittest('GCCParserTorture', 'SULONG_PARSER_TORTURE', description="Parser test using GCC suite", testClasses=['ParserTortureSuite'], tags=['parser'])
186186
_unittest('GCC_C', 'SULONG_GCC_C_TEST_SUITE', description="GCC 5.2 test suite (C tests)", testClasses=['GccCSuite'], tags=['gcc_c'])
187187
_unittest('GCC_CPP', 'SULONG_GCC_CPP_TEST_SUITE', description="GCC 5.2 test suite (C++ tests)", testClasses=['GccCppSuite'], tags=['gcc_cpp'])
188-
_unittest('GCC_Fortran', 'SULONG_GCC_FORTRAN_TEST_SUITE', description="GCC 5.2 test suite (Fortran tests)", testClasses=['GccFortranSuite'], tags=['gcc_fortran'])
189188
_unittest('Sulong', 'SULONG_STANDALONE_TEST_SUITES', description="Sulong's internal tests", testClasses='SulongSuite', tags=['sulongStandalone', 'sulongBasic', 'standalone'],
190189
# run only a small subset of the tests on the jvm standalone, the startup overhead per test is too high for more
191190
extraUnittestArgs=['-Dsulongtest.testNameFilter=cpp'] if slowStandalone else [])

sulong/mx.sulong/mx_sulong_suite_constituents.py

+1-66
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2016, 2024, Oracle and/or its affiliates.
2+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates.
33
#
44
# All rights reserved.
55
#
@@ -75,60 +75,12 @@ def compileTestSuite(testsuiteproject, extra_build_args):
7575
mx.command_function('build')(defaultBuildArgs + extra_build_args)
7676

7777

78-
class DragonEggSupport:
79-
"""Helpers for DragonEgg
80-
81-
DragonEgg support is controlled by two environment variables:
82-
* `DRAGONEGG_GCC`: path to a GCC installation with dragonegg support
83-
* `DRAGONEGG_LLVM`: path to an LLVM installation that can deal with bitcode produced by DragonEgg
84-
* `DRAGONEGG`: (optional) path to folder that contains the `libdragonegg.so`
85-
"""
86-
87-
@staticmethod
88-
def haveDragonegg():
89-
if not hasattr(DragonEggSupport, '_haveDragonegg'):
90-
DragonEggSupport._haveDragonegg = DragonEggSupport.pluginPath() is not None and os.path.exists(
91-
DragonEggSupport.pluginPath()) and DragonEggSupport.findGCCProgram('gcc', optional=True) is not None
92-
return DragonEggSupport._haveDragonegg
93-
94-
@staticmethod
95-
def pluginPath():
96-
if 'DRAGONEGG' in os.environ:
97-
return os.path.join(os.environ['DRAGONEGG'], mx.add_lib_suffix('dragonegg'))
98-
if 'DRAGONEGG_GCC' in os.environ:
99-
path = os.path.join(os.environ['DRAGONEGG_GCC'], 'lib', mx.add_lib_suffix('dragonegg'))
100-
if os.path.exists(path):
101-
return path
102-
return None
103-
104-
@staticmethod
105-
def findLLVMProgram(program, optional=False):
106-
if 'DRAGONEGG_LLVM' in os.environ:
107-
path = os.environ['DRAGONEGG_LLVM']
108-
return os.path.join(path, 'bin', program)
109-
if optional:
110-
return None
111-
mx.abort("Cannot find LLVM program for dragonegg: {}\nDRAGONEGG_LLVM environment variable not set".format(program))
112-
113-
@staticmethod
114-
def findGCCProgram(gccProgram, optional=False):
115-
if 'DRAGONEGG_GCC' in os.environ:
116-
path = os.environ['DRAGONEGG_GCC']
117-
return os.path.join(path, 'bin', gccProgram)
118-
if optional:
119-
return None
120-
mx.abort("Cannot find GCC program for dragonegg: {}\nDRAGONEGG_GCC environment variable not set".format(gccProgram))
121-
122-
12378
class SulongTestSuiteMixin(object, metaclass=abc.ABCMeta):
12479

12580
def getVariants(self):
12681
if not hasattr(self, '_variants'):
12782
self._variants = []
12883
for v in self.variants:
129-
if 'gcc' in v and not DragonEggSupport.haveDragonegg():
130-
mx.warn('Could not find dragonegg, not building test variant "%s"' % v)
131-
continue
13284
self._variants.append(v)
13385
return self._variants
13486

@@ -311,14 +263,6 @@ def getBuildEnv(self, replaceVar=mx_subst.path_substitutions):
311263
env['GRAALVM_LLVM_HOME'] = mx_subst.path_substitutions.substitute("<path:SULONG_HOME>")
312264
if 'OS' not in env:
313265
env['OS'] = mx_subst.path_substitutions.substitute("<os>")
314-
if DragonEggSupport.haveDragonegg():
315-
env['DRAGONEGG'] = DragonEggSupport.pluginPath()
316-
env['DRAGONEGG_GCC'] = DragonEggSupport.findGCCProgram('gcc', optional=False)
317-
env['DRAGONEGG_LLVMAS'] = DragonEggSupport.findLLVMProgram("llvm-as")
318-
env['DRAGONEGG_FC'] = DragonEggSupport.findGCCProgram('gfortran', optional=False)
319-
env['FC'] = DragonEggSupport.findGCCProgram('gfortran', optional=False)
320-
elif not self._is_needs_rebuild_call and getattr(self, 'requireDragonegg', False):
321-
mx.abort('Could not find dragonegg, cannot build "{}" (requireDragonegg = True).'.format(self.name))
322266
return env
323267

324268
def getTestFile(self):
@@ -525,8 +469,6 @@ class SulongCMakeTestSuite(SulongTestSuiteMixin, mx_cmake.CMakeNinjaProject): #
525469
The source file is compiled to an executable with an embedded bitcode section.
526470
- "toolchain"
527471
The toolchain wrappers are used to compile the test source into an executable with embedded bitcode.
528-
- "gcc"
529-
The source is compiled to bitcode using gcc and the DRAGONEGG plugin.
530472
buildRef:
531473
If True (the default), build a reference executable. Setting this to False is useful for embedded tests with
532474
dedicated JUnit test classes.
@@ -597,13 +539,6 @@ def _default_cmake_vars(self):
597539
_config['LLVM_CONFIG'] = mx_sulong.findBundledLLVMProgram('llvm-config')
598540
_config['LLVM_OBJCOPY'] = mx_sulong.findBundledLLVMProgram('llvm-objcopy')
599541
_config['CMAKE_NM'] = mx_sulong.findBundledLLVMProgram('llvm-nm')
600-
if DragonEggSupport.haveDragonegg():
601-
_config['DRAGONEGG'] = DragonEggSupport.pluginPath()
602-
_config['DRAGONEGG_GCC'] = DragonEggSupport.findGCCProgram('gcc', optional=False)
603-
_config['DRAGONEGG_LLVM_LINK'] = DragonEggSupport.findLLVMProgram("llvm-link")
604-
_config['DRAGONEGG_LLVMAS'] = DragonEggSupport.findLLVMProgram("llvm-as")
605-
_config['DRAGONEGG_FC'] = DragonEggSupport.findGCCProgram('gfortran', optional=False)
606-
_config['FC'] = DragonEggSupport.findGCCProgram('gfortran', optional=False)
607542
return _config
608543

609544
def cmake_config(self):

sulong/mx.sulong/suite.py

+17-47
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,6 @@
5454
},
5555
# Support Libraries.
5656
# Projects depending on these will *not be built* if the 'optional' is 'True' for the given OS/architecture.
57-
# This is a dummy library for dragonegg support.
58-
"DRAGONEGG_SUPPORT" : {
59-
"os_arch" : {
60-
"linux" : {
61-
"amd64" : {
62-
"path": "tests/support.txt",
63-
"digest": "sha512:c02b248975b267f4200603ff2ae40b9d0cdefad4a792f386d610f2b14fb4e67e288c235fd11ed596dd8c91a3dae62fdd741bf97b5c01b5f085485f221702f0a1",
64-
},
65-
"<others>": {"optional": True},
66-
},
67-
"<others>": {"<others>" : {"optional": True}},
68-
},
69-
},
7057
# This is a dummy library for malloc.h support.
7158
"MALLOC_H_SUPPORT" : {
7259
"os_arch" : {
@@ -963,6 +950,7 @@
963950
"LIBCXX_INCLUDE_BENCHMARKS": "NO",
964951
"LIBCXX_INCLUDE_TESTS": "NO",
965952
"LIBCXX_ENABLE_STATIC" : "NO",
953+
"LIBUNWIND_ENABLE_STATIC" : "NO",
966954
"CMAKE_INSTALL_PREFIX" : "native",
967955
# workaround for build problem with cmake >=3.22
968956
# see https://lists.llvm.org/pipermail/llvm-dev/2021-December/154144.html
@@ -978,6 +966,9 @@
978966
"cmakeConfig" : {
979967
"CMAKE_INSTALL_RPATH" : "\\$ORIGIN",
980968
"LLVM_ENABLE_RUNTIMES" : "libcxx;libcxxabi;libunwind",
969+
"CMAKE_ASM_FLAGS": "-ffile-prefix-map=<sulong_prefix:com.oracle.truffle.llvm.libraries.bitcode.libcxx>=llvm-project",
970+
"CMAKE_C_FLAGS": "-ffile-prefix-map=<sulong_prefix:com.oracle.truffle.llvm.libraries.bitcode.libcxx>=llvm-project",
971+
"CMAKE_CXX_FLAGS": "-ffile-prefix-map=<sulong_prefix:com.oracle.truffle.llvm.libraries.bitcode.libcxx>=llvm-project",
981972
},
982973
},
983974
"linux-musl" : {
@@ -988,6 +979,9 @@
988979
"CMAKE_INSTALL_RPATH" : "\\$ORIGIN",
989980
"LLVM_ENABLE_RUNTIMES" : "libcxx;libcxxabi;libunwind",
990981
"LIBCXX_HAS_MUSL_LIBC" : "YES",
982+
"CMAKE_ASM_FLAGS": "-ffile-prefix-map=<sulong_prefix:com.oracle.truffle.llvm.libraries.bitcode.libcxx>=llvm-project",
983+
"CMAKE_C_FLAGS": "-ffile-prefix-map=<sulong_prefix:com.oracle.truffle.llvm.libraries.bitcode.libcxx>=llvm-project",
984+
"CMAKE_CXX_FLAGS": "-ffile-prefix-map=<sulong_prefix:com.oracle.truffle.llvm.libraries.bitcode.libcxx>=llvm-project",
991985
},
992986
},
993987
"darwin" : {
@@ -998,6 +992,9 @@
998992
"CMAKE_INSTALL_RPATH" : "@loader_path/",
999993
"LLVM_ENABLE_RUNTIMES" : "libcxx;libcxxabi;libunwind",
1000994
"CMAKE_LIBTOOL" : "<path:LLVM_TOOLCHAIN>/bin/llvm-libtool-darwin",
995+
"CMAKE_ASM_FLAGS": "-ffile-prefix-map=<sulong_prefix:com.oracle.truffle.llvm.libraries.bitcode.libcxx>=llvm-project",
996+
"CMAKE_C_FLAGS": "-ffile-prefix-map=<sulong_prefix:com.oracle.truffle.llvm.libraries.bitcode.libcxx>=llvm-project",
997+
"CMAKE_CXX_FLAGS": "-ffile-prefix-map=<sulong_prefix:com.oracle.truffle.llvm.libraries.bitcode.libcxx>=llvm-project",
1001998
},
1002999
},
10031000
"windows" : {
@@ -1109,7 +1106,7 @@
11091106
"com.oracle.truffle.llvm.tests.sulong.native" : {
11101107
"subDir" : "tests",
11111108
"class" : "SulongCMakeTestSuite",
1112-
"variants" : ["bitcode-O0", "bitcode-O1", "bitcode-O2", "bitcode-O3", "gcc-O0"],
1109+
"variants" : ["bitcode-O0", "bitcode-O1", "bitcode-O2", "bitcode-O3"],
11131110
"dependencies" : ["SULONG_TEST"],
11141111
"testProject" : True,
11151112
"defaultBuild" : False,
@@ -1524,28 +1521,6 @@
15241521
"testProject" : True,
15251522
"defaultBuild" : False,
15261523
},
1527-
"gcc_fortran" : {
1528-
"subDir" : "tests/gcc",
1529-
# The Ninja generator used by mx (version 1.8.2) does not support Fortran using Ninja version [GR-30808]
1530-
# "class" : "ExternalCMakeTestSuite",
1531-
# "variants" : ["executable-O0"],
1532-
"class" : "ExternalTestSuite",
1533-
"variants" : ["O0_OUT"],
1534-
"testDir" : "gcc-5.2.0/gcc/testsuite",
1535-
"fileExts" : [".f90", ".f", ".f03"],
1536-
"requireDragonegg" : True,
1537-
"native" : True,
1538-
"vpath" : True,
1539-
"single_job" : True, # problem with parallel builds and temporary module files
1540-
"buildRef" : True,
1541-
"dependencies" : ["SULONG_TEST"],
1542-
"buildDependencies" : [
1543-
"GCC_SOURCE",
1544-
"DRAGONEGG_SUPPORT",
1545-
],
1546-
"testProject" : True,
1547-
"defaultBuild" : False,
1548-
},
15491524
"parserTorture" : {
15501525
"subDir" : "tests/gcc",
15511526
"class" : "ExternalCMakeTestSuite",
@@ -1896,7 +1871,12 @@
18961871
},
18971872
"<others>" : {
18981873
"layout" : {
1899-
"./": ["dependency:com.oracle.truffle.llvm.libraries.bitcode.libcxx/*"],
1874+
"./": [{
1875+
"source_type": "dependency",
1876+
"dependency": "com.oracle.truffle.llvm.libraries.bitcode.libcxx",
1877+
"path": "*",
1878+
"exclude": "native/lib/*.a",
1879+
}],
19001880
"./native/lib/<lib:graalvm-llvm>": "link:<libv:graalvm-llvm.1>",
19011881
# for source compatibility
19021882
"./native/lib/<lib:polyglot-mock>": "link:<lib:graalvm-llvm>",
@@ -2256,16 +2236,6 @@
22562236
"testDistribution" : True,
22572237
"defaultBuild" : False,
22582238
},
2259-
"SULONG_GCC_FORTRAN_TEST_SUITE" : {
2260-
"native" : True,
2261-
"relpath" : True,
2262-
"platformDependent" : True,
2263-
"layout" : {
2264-
"./" : ["dependency:gcc_fortran/*"],
2265-
},
2266-
"testDistribution" : True,
2267-
"defaultBuild" : False,
2268-
},
22692239
"SULONG_PARSER_TORTURE" : {
22702240
"native" : True,
22712241
"relpath" : True,

sulong/projects/com.oracle.truffle.llvm.libraries.bitcode/CMakeLists.txt

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2021, 2024, Oracle and/or its affiliates.
2+
# Copyright (c) 2021, 2025, Oracle and/or its affiliates.
33
#
44
# All rights reserved.
55
#
@@ -53,8 +53,11 @@ check_var(GRAALVM_LLVM_LIBS_INCLUDE_DIR)
5353
check_var(LIBCXX_SRC)
5454

5555
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR})
56-
add_compile_options(-fdebug-prefix-map=${CMAKE_SOURCE_DIR}=${CMAKE_PROJECT_NAME})
57-
add_compile_options(-fdebug-prefix-map=${CMAKE_BINARY_DIR}=${CMAKE_PROJECT_NAME})
56+
add_compile_options(-ffile-prefix-map=${CMAKE_SOURCE_DIR}=${CMAKE_PROJECT_NAME})
57+
add_compile_options(-ffile-prefix-map=${CMAKE_BINARY_DIR}=${CMAKE_PROJECT_NAME})
58+
add_compile_options(-ffile-prefix-map=${GRAALVM_LLVM_INCLUDE_DIR}=com.oracle.truffle.llvm.libraries.graalvm.llvm/include)
59+
add_compile_options(-ffile-prefix-map=${GRAALVM_LLVM_LIBS_INCLUDE_DIR}=com.oracle.truffle.llvm.libraries.graalvm.llvm.libs/include)
60+
add_compile_options(-ffile-prefix-map=${LIBCXX_SRC}=llvm-project)
5861

5962
if (APPLE)
6063
set(CMAKE_INSTALL_RPATH "@loader_path")

sulong/projects/com.oracle.truffle.llvm.libraries.graalvm.llvm.libs/CMakeLists.txt

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2021, 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2021, 2025, Oracle and/or its affiliates.
33
#
44
# All rights reserved.
55
#
@@ -37,8 +37,9 @@ if(NOT GRAALVM_LLVM_INCLUDE_DIR)
3737
endif()
3838

3939
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR})
40-
add_compile_options(-fdebug-prefix-map=${CMAKE_SOURCE_DIR}=${CMAKE_PROJECT_NAME})
41-
add_compile_options(-fdebug-prefix-map=${CMAKE_BINARY_DIR}=${CMAKE_PROJECT_NAME})
40+
add_compile_options(-ffile-prefix-map=${CMAKE_SOURCE_DIR}=${CMAKE_PROJECT_NAME})
41+
add_compile_options(-ffile-prefix-map=${CMAKE_BINARY_DIR}=${CMAKE_PROJECT_NAME})
42+
add_compile_options(-ffile-prefix-map=${GRAALVM_LLVM_INCLUDE_DIR}=com.oracle.truffle.llvm.libraries.graalvm.llvm/include)
4243

4344
if (APPLE)
4445
set(CMAKE_INSTALL_RPATH "@loader_path")

0 commit comments

Comments
 (0)