summaryrefslogtreecommitdiffstats
path: root/src/java/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2019-06-17 03:59:22 +0200
committerSven Gothel <[email protected]>2019-06-17 03:59:22 +0200
commit52a6d4ef4133a998824236af9bb48d0ea65359a9 (patch)
tree938009aba624e4609cd62803586d2eaf7b0e17a1 /src/java/jogamp
parent97622eb70b1ff720d91d768768b7a996ac01ad78 (diff)
iOS: Initial iOS support commit: build.xml targets, java code-path etc
Current build system for JogAmp iOS Build is: - Build Machine: OSX Mojave 10.14 - Using own (still proprietary) OpenJDK 9 iOS Build - OpenJDK 1.8 (This will be replaced by OpenJDK 11 soon) - Xcode 10.2
Diffstat (limited to 'src/java/jogamp')
-rw-r--r--src/java/jogamp/common/os/MachineDataInfoRuntime.java9
-rw-r--r--src/java/jogamp/common/os/PlatformPropsImpl.java24
2 files changed, 30 insertions, 3 deletions
diff --git a/src/java/jogamp/common/os/MachineDataInfoRuntime.java b/src/java/jogamp/common/os/MachineDataInfoRuntime.java
index af90cc5..625e537 100644
--- a/src/java/jogamp/common/os/MachineDataInfoRuntime.java
+++ b/src/java/jogamp/common/os/MachineDataInfoRuntime.java
@@ -71,6 +71,11 @@ public class MachineDataInfoRuntime {
}
throw new InternalError("Already initialized");
}
+ /**
+ * The static {@link MachineDataInfo} is utilized for high performance
+ * precompiled size, offset, etc table lookup within generated structures
+ * using the {@link MachineDataInfo.StaticConfig} index.
+ */
public static MachineDataInfo.StaticConfig getStatic() {
if(!initialized) {
synchronized(MachineDataInfo.class) { // volatile dbl-checked-locking OK
@@ -110,8 +115,10 @@ public class MachineDataInfoRuntime {
return StaticConfig.X86_32_UNIX;
}
} else {
- if( osType == Platform.OSType.WINDOWS ) {
+ if( Platform.OSType.WINDOWS == osType ) {
return StaticConfig.X86_64_WINDOWS;
+ } else if( Platform.OSType.IOS == osType && Platform.CPUType.ARM64 == cpuType ) {
+ return StaticConfig.ARM64_IOS;
} else {
// for all 64bit unix types (x86_64, aarch64, sparcv9, ..)
return StaticConfig.LP64_UNIX;
diff --git a/src/java/jogamp/common/os/PlatformPropsImpl.java b/src/java/jogamp/common/os/PlatformPropsImpl.java
index 55335c1..f929ab7 100644
--- a/src/java/jogamp/common/os/PlatformPropsImpl.java
+++ b/src/java/jogamp/common/os/PlatformPropsImpl.java
@@ -38,7 +38,7 @@ import com.jogamp.common.util.VersionNumber;
public abstract class PlatformPropsImpl {
static final boolean DEBUG = Debug.debug("Platform");
- /** Selected {@link Platform.OSType#MACOS} {@link VersionNumber}s. */
+ /** Selected {@link Platform.OSType#MACOS} or {@link Platform.OSType#IOS} {@link VersionNumber}s. */
public static class OSXVersion {
/** OSX Tiger, i.e. 10.4.0 */
public static final VersionNumber Tiger = new VersionNumber(10,4,0);
@@ -101,6 +101,14 @@ public abstract class PlatformPropsImpl {
public static final ABIType ABI_TYPE;
public static final OSType OS_TYPE;
public static final String os_and_arch;
+ /**
+ * Usually GlueGen and subsequent JogAmp modules are build using dynamic libraries on supported platforms,
+ * hence this boolean is expected to be true.
+ * <p>
+ * However, on certain systems static libraries are being used on which native JNI library loading is disabled.
+ * </p>
+ */
+ public static final boolean useDynamicLibraries;
static {
Version16 = new VersionNumber(1, 6, 0);
@@ -318,8 +326,13 @@ public abstract class PlatformPropsImpl {
strategy = 220;
}
}
+ if( OSType.IOS == OS_TYPE ) {
+ useDynamicLibraries = false;
+ } else {
+ useDynamicLibraries = true;
+ }
if( DEBUG ) {
- System.err.println("Platform.Hard: ARCH "+ARCH+", CPU_ARCH "+CPU_ARCH+", ABI_TYPE "+ABI_TYPE+" - strategy "+strategy+"(isAndroid "+isAndroid+", elfValid "+elfValid+")");
+ System.err.println("Platform.Hard: ARCH "+ARCH+", CPU_ARCH "+CPU_ARCH+", ABI_TYPE "+ABI_TYPE+" - strategy "+strategy+"(isAndroid "+isAndroid+", elfValid "+elfValid+"), useDynLibs "+useDynamicLibraries);
}
os_and_arch = getOSAndArch(OS_TYPE, CPU_ARCH, ABI_TYPE, LITTLE_ENDIAN);
}
@@ -492,6 +505,9 @@ public abstract class PlatformPropsImpl {
if ( osLower.startsWith("kd") ) {
return OSType.OPENKODE;
}
+ if ( osLower.startsWith("ios") ) {
+ return OSType.IOS;
+ }
throw new RuntimeException("Please port OS detection to your platform (" + OS_lower + "/" + ARCH_lower + ")");
}
@@ -607,6 +623,10 @@ public abstract class PlatformPropsImpl {
os_ = "macosx";
_and_arch_final = "universal";
break;
+ case IOS:
+ os_ = "ios";
+ _and_arch_final = _and_arch_tmp;
+ break;
case WINDOWS:
os_ = "windows";
_and_arch_final = _and_arch_tmp;