Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8257895: Allow building of JavaFX media libs for Apple Silicon #20

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
@@ -420,6 +420,9 @@ if (IS_STATIC_BUILD && IS_COMPILE_MEDIA) {
throw new GradleException("Can not have COMPILE_MEDIA when STATIC_BUILD is enabled");
}

// By default, target architecture = host architecture, but we allow different ones.
defineProperty("TARGET_ARCH", OS_ARCH)

// BUILD_TOOLS_DOWNLOAD_SCRIPT specifies a path of a gradle script which downloads
// required build tools.
defineProperty("BUILD_TOOLS_DOWNLOAD_SCRIPT", "")
@@ -3809,13 +3812,13 @@ project(":media") {
doLast {
exec {
commandLine ("make", "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/${projectDir}/libffi")
args("OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}", "BASE_NAME=ffi")
args("OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}", "BASE_NAME=ffi", "ARCH=$TARGET_ARCH")
args ("CC=${mediaProperties.compiler}", "LINKER=${mediaProperties.linker}", "AR=${mediaProperties.ar}")
}

exec {
commandLine ("make", "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/${projectDir}/glib-lite")
args("OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}", "BASE_NAME=glib-lite")
args("OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}", "BASE_NAME=glib-lite", "ARCH=$TARGET_ARCH")
args ("CC=${mediaProperties.compiler}", "LINKER=${mediaProperties.linker}")
}
}
@@ -114,7 +114,7 @@ def commonParams = [
"-arch", "$TARGET_ARCH"]

if (hasProperty('TARGET_ARCH')) {
commonParams = ["-target", "${TARGET_ARCH}-apple-macos-11", commonParams]
commonParams = ["-target", "${TARGET_ARCH}-apple-macos-11", commonParams].flatten()
}

def ccBaseFlags = [
Loading