diff options
| author | Lakshmi P Shanmugam | 2021-03-23 08:45:44 +0000 |
|---|---|---|
| committer | Lakshmi P Shanmugam | 2021-03-23 12:16:34 +0000 |
| commit | 7fc856229a1e26eae354adf70d11b39d6727c20e (patch) | |
| tree | 26a3cb3030480018e2b630f6e1ce182800a49479 | |
| parent | 8d43dd775721a351f94749228d4303dadd868eab (diff) | |
| download | eclipse.platform.resources-7fc856229a1e26eae354adf70d11b39d6727c20e.tar.gz eclipse.platform.resources-7fc856229a1e26eae354adf70d11b39d6727c20e.tar.xz eclipse.platform.resources-7fc856229a1e26eae354adf70d11b39d6727c20e.zip | |
Bug 572096 - Build core.filesystem library for arm64
Make file changes to build Mac arm64 + x86_64 universal library
XCode 12.2 or newer is required to build the universal binary, but
JavaVM framework is not available since XCode 12.2.
Removed JavaVM from Makefile.
The native library will be built by Jenkins job and committed separately.
Change-Id: I3f96ce7d04acfa71c3187966f809ed61aa75d689
| -rw-r--r-- | bundles/org.eclipse.core.filesystem.macosx/BUILD_INFO.txt | 13 | ||||
| -rw-r--r-- | bundles/org.eclipse.core.filesystem/natives/unix/README.TXT | 12 | ||||
| -rwxr-xr-x[-rw-r--r--] | bundles/org.eclipse.core.filesystem/natives/unix/macosx/Makefile | 8 |
3 files changed, 22 insertions, 11 deletions
diff --git a/bundles/org.eclipse.core.filesystem.macosx/BUILD_INFO.txt b/bundles/org.eclipse.core.filesystem.macosx/BUILD_INFO.txt index 9f56ba7ef..d29a88b56 100644 --- a/bundles/org.eclipse.core.filesystem.macosx/BUILD_INFO.txt +++ b/bundles/org.eclipse.core.filesystem.macosx/BUILD_INFO.txt @@ -1,10 +1,9 @@ Native Build Info: ------------------ -Platform: iMac -Built by: pawel.pogorzelski@pl.ibm.com -Build date: 21-Jan-2010 -OS Name: Mac OS X -OS Version: 10.5.7 -Compiler version: gcc version 4.0.1 -Java version: Standard Edition (build 1.5.0_19-137)
\ No newline at end of file +Platform: Jenkins Mac slave (b9h15-macos10.15) +OS Name: macOS +OS Version: 10.15.7 +Compiler version: Apple clang version 12.0.0 +Java version: jdk1.8.0_192 +Architecture: x86_64 and arm64 (universal binary)
\ No newline at end of file diff --git a/bundles/org.eclipse.core.filesystem/natives/unix/README.TXT b/bundles/org.eclipse.core.filesystem/natives/unix/README.TXT index 8bf350b64..08b5d604e 100644 --- a/bundles/org.eclipse.core.filesystem/natives/unix/README.TXT +++ b/bundles/org.eclipse.core.filesystem/natives/unix/README.TXT @@ -1,3 +1,13 @@ This directory contains the source code for Unix-based platforms, including Linux and Mac OS X. These platforms -all share the same C source, but have different makefiles.
\ No newline at end of file +all share the same C source, but have different makefiles. + +The macOS library in the macosx fragment is a Mach-O universal binary with +2 architectures: [x86_64:Mach-O 64-bit bundle x86_64] [arm64:Mach-O 64-bit bundle arm64] +XCode 12.2 or newer is required to build this. + +Command to build the native library: +make -f Makefile clean install + +Don't commit the library that was locally built on the developer machine. +Use the Jenkins job to build the library, sign it and commit it to the repo. diff --git a/bundles/org.eclipse.core.filesystem/natives/unix/macosx/Makefile b/bundles/org.eclipse.core.filesystem/natives/unix/macosx/Makefile index 4b37821c1..e996bb6bd 100644..100755 --- a/bundles/org.eclipse.core.filesystem/natives/unix/macosx/Makefile +++ b/bundles/org.eclipse.core.filesystem/natives/unix/macosx/Makefile @@ -19,12 +19,14 @@ LIB_NAME_FULL=libunixfile_1_0_0.jnilib JAVA_HOME=$(shell /usr/libexec/java_home) +$(info JAVA_HOME is $(JAVA_HOME)) + JDK_INCLUDE=-I $(JAVA_HOME)/include -I $(JAVA_HOME)/include/darwin MACOSX_DEPLOYMENT_TARGET=10.10 -FRAMEWORKS=-framework JavaVM -framework CoreServices +FRAMEWORKS=-framework CoreServices # define MACOSX to include Mac OS X specific code -CC_FLAGS=-arch x86_64 -mmacosx-version-min=10.10 -DMACOSX +CC_FLAGS=-arch x86_64 -arch arm64 -mmacosx-version-min=10.10 -DMACOSX core: cc $(JDK_INCLUDE) $(CORE.C) -o $(LIB_NAME_FULL) -bundle $(FRAMEWORKS) $(CC_FLAGS) @@ -32,6 +34,6 @@ core: clean: rm -f $(LIB_NAME_FULL) -install: +install: core rm -f ../../../../org.eclipse.core.filesystem.macosx/os/macosx/$(LIB_NAME_FULL) mv $(LIB_NAME_FULL) ../../../../org.eclipse.core.filesystem.macosx/os/macosx/ |
