backend-infra-engineer: Fix Homebrew LLVM build plumbing
This commit is contained in:
@@ -100,7 +100,17 @@ endif()
|
|||||||
|
|
||||||
# ABSL_TARGETS is now available to the rest of the project via include()
|
# ABSL_TARGETS is now available to the rest of the project via include()
|
||||||
|
|
||||||
if(APPLE AND DEFINED CMAKE_OSX_ARCHITECTURES AND CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
|
set(_yaze_absl_arm64 FALSE)
|
||||||
|
if(APPLE)
|
||||||
|
if(CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
|
||||||
|
set(_yaze_absl_arm64 TRUE)
|
||||||
|
elseif(CMAKE_OSX_ARCHITECTURES STREQUAL "" AND CMAKE_SYSTEM_PROCESSOR MATCHES "arm64|aarch64")
|
||||||
|
# Homebrew LLVM doesn't honor -Xarch_x86_64; strip x86 flags on arm64-only builds.
|
||||||
|
set(_yaze_absl_arm64 TRUE)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(_yaze_absl_arm64)
|
||||||
foreach(_absl_target IN ITEMS absl_random_internal_randen_hwaes absl_random_internal_randen_hwaes_impl)
|
foreach(_absl_target IN ITEMS absl_random_internal_randen_hwaes absl_random_internal_randen_hwaes_impl)
|
||||||
if(TARGET ${_absl_target})
|
if(TARGET ${_absl_target})
|
||||||
get_target_property(_absl_opts ${_absl_target} COMPILE_OPTIONS)
|
get_target_property(_absl_opts ${_absl_target} COMPILE_OPTIONS)
|
||||||
|
|||||||
@@ -58,5 +58,12 @@ message(STATUS "Using macOS SDK at: ${CMAKE_SYSROOT}")
|
|||||||
# and all dependencies.
|
# and all dependencies.
|
||||||
set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES "${HOMEBREW_LLVM_PREFIX}/include/c++/v1")
|
set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES "${HOMEBREW_LLVM_PREFIX}/include/c++/v1")
|
||||||
|
|
||||||
|
# 5.5 Ensure Homebrew libc++ is linked to avoid mixing ABI with system libc++.
|
||||||
|
set(_yaze_llvm_lib_dir "${HOMEBREW_LLVM_PREFIX}/lib")
|
||||||
|
set(CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS_INIT} -stdlib=libc++")
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT} -L${_yaze_llvm_lib_dir} -Wl,-rpath,${_yaze_llvm_lib_dir}")
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS_INIT "${CMAKE_SHARED_LINKER_FLAGS_INIT} -L${_yaze_llvm_lib_dir} -Wl,-rpath,${_yaze_llvm_lib_dir}")
|
||||||
|
set(CMAKE_MODULE_LINKER_FLAGS_INIT "${CMAKE_MODULE_LINKER_FLAGS_INIT} -L${_yaze_llvm_lib_dir} -Wl,-rpath,${_yaze_llvm_lib_dir}")
|
||||||
|
|
||||||
# 6. Set the default installation path for macOS frameworks
|
# 6. Set the default installation path for macOS frameworks
|
||||||
set(CMAKE_FIND_FRAMEWORK FIRST)
|
set(CMAKE_FIND_FRAMEWORK FIRST)
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
### 2025-12-21 backend-infra-engineer – Pre-0.2.2 history phase snapshotting
|
### 2025-12-21 backend-infra-engineer – Pre-0.2.2 history phase snapshotting
|
||||||
- TASK: Add additional pre-0.2.2 phase snapshots (2024 Q1/Q2/Q3) and re-rewrite history safely.
|
- TASK: Add additional pre-0.2.2 phase snapshots (2024 Q1/Q2/Q3) and re-rewrite history safely.
|
||||||
- SCOPE: git history, tags, backups
|
- SCOPE: git history, tags, backups
|
||||||
- STATUS: IN_PROGRESS
|
- STATUS: COMPLETE
|
||||||
- NOTES: Will create new bundle backup, rewrite snapshot chain, retag, and force-push origin/master + tags.
|
- NOTES: Rewrote chain with pre-0.2.2-2024-q1/q2/q3 tags; forced push origin/master + tags; backup bundle saved (20251221T191959). Build/test pending after Homebrew libc++ link fix.
|
||||||
|
|
||||||
### 2025-12-07 snes-emulator-expert – ALTTP input/audio regression triage
|
### 2025-12-07 snes-emulator-expert – ALTTP input/audio regression triage
|
||||||
- TASK: Investigate SDL2/ImGui input pipeline and LakeSnes-based core for ALTTP A-button edge detection failure on naming screen + audio stutter on title screen
|
- TASK: Investigate SDL2/ImGui input pipeline and LakeSnes-based core for ALTTP A-button edge detection failure on naming screen + audio stutter on title screen
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ if(EMSCRIPTEN)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Add JSON and httplib support if enabled
|
# Add JSON and httplib support if enabled
|
||||||
if(YAZE_WITH_JSON)
|
if(YAZE_ENABLE_JSON)
|
||||||
# Link nlohmann_json which provides the include directories automatically
|
# Link nlohmann_json which provides the include directories automatically
|
||||||
target_link_libraries(yaze_net PUBLIC nlohmann_json::nlohmann_json)
|
target_link_libraries(yaze_net PUBLIC nlohmann_json::nlohmann_json)
|
||||||
target_include_directories(yaze_net PUBLIC ${CMAKE_SOURCE_DIR}/ext/httplib)
|
target_include_directories(yaze_net PUBLIC ${CMAKE_SOURCE_DIR}/ext/httplib)
|
||||||
@@ -102,8 +102,17 @@ if(YAZE_WITH_JSON)
|
|||||||
# WebSocket will work with plain HTTP (no SSL/TLS) on Windows
|
# WebSocket will work with plain HTTP (no SSL/TLS) on Windows
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
find_package(OpenSSL QUIET)
|
find_package(OpenSSL QUIET)
|
||||||
if(OpenSSL_FOUND)
|
if(OPENSSL_INCLUDE_DIR)
|
||||||
target_link_libraries(yaze_net PUBLIC OpenSSL::SSL OpenSSL::Crypto)
|
target_include_directories(yaze_net PUBLIC ${OPENSSL_INCLUDE_DIR})
|
||||||
|
elseif(OPENSSL_ROOT_DIR)
|
||||||
|
target_include_directories(yaze_net PUBLIC ${OPENSSL_ROOT_DIR}/include)
|
||||||
|
endif()
|
||||||
|
if(OPENSSL_FOUND)
|
||||||
|
if(TARGET OpenSSL::SSL)
|
||||||
|
target_link_libraries(yaze_net PUBLIC OpenSSL::SSL OpenSSL::Crypto)
|
||||||
|
else()
|
||||||
|
target_link_libraries(yaze_net PUBLIC ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
|
||||||
|
endif()
|
||||||
target_compile_definitions(yaze_net PUBLIC CPPHTTPLIB_OPENSSL_SUPPORT)
|
target_compile_definitions(yaze_net PUBLIC CPPHTTPLIB_OPENSSL_SUPPORT)
|
||||||
message(STATUS " - WebSocket with SSL/TLS support enabled")
|
message(STATUS " - WebSocket with SSL/TLS support enabled")
|
||||||
else()
|
else()
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ target_link_libraries(yaze_grpc_support PUBLIC
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Add JSON support
|
# Add JSON support
|
||||||
if(YAZE_WITH_JSON)
|
if(YAZE_ENABLE_JSON)
|
||||||
target_include_directories(yaze_grpc_support PUBLIC
|
target_include_directories(yaze_grpc_support PUBLIC
|
||||||
${CMAKE_SOURCE_DIR}/ext/json/include)
|
${CMAKE_SOURCE_DIR}/ext/json/include)
|
||||||
target_compile_definitions(yaze_grpc_support PUBLIC YAZE_WITH_JSON)
|
target_compile_definitions(yaze_grpc_support PUBLIC YAZE_WITH_JSON)
|
||||||
|
|||||||
@@ -180,13 +180,13 @@ set(YAZE_AGENT_CORE_SOURCES
|
|||||||
cli/service/agent/tools/validation_tool.cc
|
cli/service/agent/tools/validation_tool.cc
|
||||||
cli/service/agent/tools/visual_analysis_tool.cc
|
cli/service/agent/tools/visual_analysis_tool.cc
|
||||||
cli/service/agent/disassembler_65816.cc
|
cli/service/agent/disassembler_65816.cc
|
||||||
cli/service/agent/rom_debug_agent.cc
|
|
||||||
cli/service/agent/vim_mode.cc
|
cli/service/agent/vim_mode.cc
|
||||||
cli/service/command_registry.cc
|
cli/service/command_registry.cc
|
||||||
cli/service/gui/gui_action_generator.cc
|
cli/service/gui/gui_action_generator.cc
|
||||||
cli/service/net/z3ed_network_client.cc
|
cli/service/net/z3ed_network_client.cc
|
||||||
cli/service/planning/policy_evaluator.cc
|
cli/service/planning/policy_evaluator.cc
|
||||||
cli/service/planning/proposal_registry.cc
|
cli/service/planning/proposal_registry.cc
|
||||||
|
cli/service/planning/tile16_proposal_generator.cc
|
||||||
cli/service/resources/command_context.cc
|
cli/service/resources/command_context.cc
|
||||||
cli/service/resources/command_handler.cc
|
cli/service/resources/command_handler.cc
|
||||||
cli/service/resources/resource_catalog.cc
|
cli/service/resources/resource_catalog.cc
|
||||||
@@ -207,6 +207,12 @@ set(YAZE_AGENT_CORE_SOURCES
|
|||||||
app/editor/agent/panels/agent_editor_panels.cc
|
app/editor/agent/panels/agent_editor_panels.cc
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(YAZE_ENABLE_REMOTE_AUTOMATION)
|
||||||
|
list(APPEND YAZE_AGENT_CORE_SOURCES
|
||||||
|
cli/service/agent/rom_debug_agent.cc
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
# AI runtime sources
|
# AI runtime sources
|
||||||
if(YAZE_ENABLE_AI_RUNTIME)
|
if(YAZE_ENABLE_AI_RUNTIME)
|
||||||
list(APPEND YAZE_AGENT_CORE_SOURCES
|
list(APPEND YAZE_AGENT_CORE_SOURCES
|
||||||
@@ -236,7 +242,6 @@ if(YAZE_ENABLE_REMOTE_AUTOMATION)
|
|||||||
cli/handlers/tools/emulator_commands.cc
|
cli/handlers/tools/emulator_commands.cc
|
||||||
cli/service/gui/gui_automation_client.cc
|
cli/service/gui/gui_automation_client.cc
|
||||||
cli/service/gui/canvas_automation_client.cc
|
cli/service/gui/canvas_automation_client.cc
|
||||||
cli/service/planning/tile16_proposal_generator.cc
|
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -327,9 +332,18 @@ if(YAZE_ENABLE_AI_RUNTIME AND YAZE_ENABLE_JSON)
|
|||||||
# HTTP API works fine without HTTPS for local development
|
# HTTP API works fine without HTTPS for local development
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
find_package(OpenSSL)
|
find_package(OpenSSL)
|
||||||
if(OpenSSL_FOUND)
|
if(OPENSSL_INCLUDE_DIR)
|
||||||
|
target_include_directories(yaze_agent PUBLIC ${OPENSSL_INCLUDE_DIR})
|
||||||
|
elseif(OPENSSL_ROOT_DIR)
|
||||||
|
target_include_directories(yaze_agent PUBLIC ${OPENSSL_ROOT_DIR}/include)
|
||||||
|
endif()
|
||||||
|
if(OPENSSL_FOUND)
|
||||||
|
if(TARGET OpenSSL::SSL)
|
||||||
|
target_link_libraries(yaze_agent PUBLIC OpenSSL::SSL OpenSSL::Crypto)
|
||||||
|
else()
|
||||||
|
target_link_libraries(yaze_agent PUBLIC ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
|
||||||
|
endif()
|
||||||
target_compile_definitions(yaze_agent PUBLIC CPPHTTPLIB_OPENSSL_SUPPORT)
|
target_compile_definitions(yaze_agent PUBLIC CPPHTTPLIB_OPENSSL_SUPPORT)
|
||||||
target_link_libraries(yaze_agent PUBLIC OpenSSL::SSL OpenSSL::Crypto)
|
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
target_compile_definitions(yaze_agent PUBLIC CPPHTTPLIB_USE_CERTS_FROM_MACOSX_KEYCHAIN)
|
target_compile_definitions(yaze_agent PUBLIC CPPHTTPLIB_USE_CERTS_FROM_MACOSX_KEYCHAIN)
|
||||||
|
|||||||
Reference in New Issue
Block a user