Skip to content

Commit

Permalink
Add support for libsvm_container.a in Mandrel
Browse files Browse the repository at this point in the history
Closes: graalvm/mandrel#765

Depends on this upstream PR to be merged:
oracle/graal#8989

(cherry picked from commit d6ba9ca)
  • Loading branch information
jerboaa authored and zakkak committed Jul 18, 2024
1 parent 8397cae commit 3dd30e5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public class build
static final Logger logger = LogManager.getLogger(build.class);
public static final boolean IS_WINDOWS = System.getProperty("os.name").matches(".*[Ww]indows.*");
public static final boolean IS_MAC = System.getProperty("os.name").matches(".*[Mm]ac.*");
public static final boolean IS_LINUX = !IS_WINDOWS && !IS_MAC;
public static final String JDK_VERSION = "jdk" + Runtime.version().feature();
public static final String MAVEN_VERSION_FILE = ".maven-version";
private static final String MANDREL_RELEASE_FILE = "mandrel.release";
Expand Down Expand Up @@ -186,8 +187,13 @@ public static void main(String... args) throws IOException
else
{
Path libdarwinSource = null;
Path libContainerSource = null;
Path libchelperSource = Path.of("substratevm", "mxbuild", PLATFORM, "com.oracle.svm.native.libchelper", PLATFORM, (IS_MAC ? "default" : "glibc"), "liblibchelper.a");
Path libjvmSource = Path.of("substratevm", "mxbuild", platformAndJDK, "com.oracle.svm.native.jvm.posix", PLATFORM, (IS_MAC ? "default" : "glibc"), "libjvm.a");
if (IS_LINUX)
{
libContainerSource = Path.of("substratevm", "mxbuild", PLATFORM, "com.oracle.svm.native.libcontainer", PLATFORM, (IS_MAC ? "default" : "glibc"), "libsvm_container.a");
}
if (IS_MAC)
{
libdarwinSource = Path.of("substratevm", "mxbuild", PLATFORM, "com.oracle.svm.native.darwin", PLATFORM, "default", "libdarwin.a");
Expand All @@ -200,6 +206,10 @@ public static void main(String... args) throws IOException
}
FileSystem.copy(mandrelRepo.resolve(libchelperSource), clibsBasePath.resolve(Path.of("liblibchelper.a")));
FileSystem.copy(mandrelRepo.resolve(libjvmSource), clibsBasePath.resolve(Path.of("libjvm.a")));
if (IS_LINUX)
{
FileSystem.copy(mandrelRepo.resolve(libContainerSource), clibsBasePath.resolve(Path.of("libsvm_container.a")));
}
if (IS_MAC)
{
FileSystem.copy(mandrelRepo.resolve(libdarwinSource), clibsBasePath.resolve(Path.of("libdarwin.a")));
Expand Down Expand Up @@ -884,6 +894,7 @@ class Mx
{
projects = "com.oracle.svm.native.libchelper," +
"com.oracle.svm.native.reporterchelper," +
"com.oracle.svm.native.libcontainer," +
"com.oracle.svm.native.jvm.posix";
if (build.IS_MAC)
{
Expand Down

0 comments on commit 3dd30e5

Please sign in to comment.