Skip to content

Commit

Permalink
Fix destination directory for Linux c libs
Browse files Browse the repository at this point in the history
They now live in a 'glibc' sub-folder
  • Loading branch information
jerboaa committed Jan 11, 2024
1 parent e88c8b3 commit 500ebfa
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions build.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,16 @@ public static void main(String... args) throws IOException
libdarwinSource = Path.of("substratevm", "mxbuild", PLATFORM, "com.oracle.svm.native.darwin", PLATFORM, "default", "libdarwin.a");
}
Path reporterchelperSource = Path.of("substratevm", "mxbuild", platformAndJDK, "com.oracle.svm.native.reporterchelper", PLATFORM, (IS_MAC ? "default" : "glibc"), System.mapLibraryName("reporterchelper"));
FileSystem.copy(mandrelRepo.resolve(libchelperSource),
mandrelJavaHome.resolve(Path.of("lib", "svm", "clibraries", PLATFORM, "liblibchelper.a")));
FileSystem.copy(mandrelRepo.resolve(libjvmSource),
mandrelJavaHome.resolve(Path.of("lib", "svm", "clibraries", PLATFORM, "libjvm.a")));
Path clibsBasePath = mandrelJavaHome.resolve(Path.of("lib", "svm", "clibraries", PLATFORM, "glibc"));
if (IS_MAC)
{
clibsBasePath = mandrelJavaHome.resolve(Path.of("lib", "svm", "clibraries", PLATFORM));
}
FileSystem.copy(mandrelRepo.resolve(libchelperSource), clibsBasePath.resolve(Path.of("liblibchelper.a")));
FileSystem.copy(mandrelRepo.resolve(libjvmSource), clibsBasePath.resolve(Path.of("libjvm.a")));
if (IS_MAC)
{
FileSystem.copy(mandrelRepo.resolve(libdarwinSource),
mandrelJavaHome.resolve(Path.of("lib", "svm", "clibraries", PLATFORM, "libdarwin.a")));
FileSystem.copy(mandrelRepo.resolve(libdarwinSource), clibsBasePath.resolve(Path.of("libdarwin.a")));
}
FileSystem.copy(mandrelRepo.resolve(reporterchelperSource),
mandrelJavaHome.resolve(Path.of("lib", "svm", "builder", "lib", System.mapLibraryName("reporterchelper"))));
Expand Down

0 comments on commit 500ebfa

Please sign in to comment.