mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
Darwin arm64: Compile fat binaries for native helpers
GitOrigin-RevId: a4dc15f515cf01219f79ddeeabfa3cd8217abd77
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f2d9316c1e
commit
71f5dd3bb9
@@ -5,11 +5,11 @@ if(NOT APPLE)
|
||||
message(FATAL_ERROR "macOS only.")
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS "-O2 -Wall -Wextra -Wpedantic -Wno-newline-eof")
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.8)
|
||||
|
||||
find_library(CORE_SERVICES CoreServices)
|
||||
|
||||
add_compile_options("-fmodules" "-flto=full" "-Wall" "-Wextra" "-Wpedantic" "-Wno-newline-eof")
|
||||
add_executable(fsnotifier fsnotifier.c)
|
||||
target_link_libraries(fsnotifier ${CORE_SERVICES})
|
||||
|
||||
install(TARGETS fsnotifier DESTINATION ${CMAKE_CURRENT_LIST_DIR}/../../../bin/mac)
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
C_FLAGS="-std=c11 -O2 -Wall -Wextra -Wpedantic -Wno-newline-eof"
|
||||
|
||||
clang -arch x86_64 -mmacosx-version-min=10.8 -framework CoreServices -std=c11 $C_FLAGS -o fsnotifier_x86_64 fsnotifier.c
|
||||
clang -arch arm64 -mmacosx-version-min=10.8 -framework CoreServices -std=c11 $C_FLAGS -o fsnotifier_arm64 fsnotifier.c
|
||||
lipo -create fsnotifier_x86_64 fsnotifier_arm64 -o fsnotifier
|
||||
rm fsnotifier_arm64
|
||||
rm fsnotifier_x86_64
|
||||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make install/strip VERBOSE=1
|
||||
Reference in New Issue
Block a user