Skip to content

Commit

Permalink
Fix linking on x86
Browse files Browse the repository at this point in the history
  • Loading branch information
captainurist committed Sep 19, 2023
1 parent c0ed4de commit 081c31e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
- name: Build
working-directory: build
run: |
make -j3
make -j3 VERBOSE=1
- name: Run unit tests
working-directory: build
Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,20 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "Release")
set(OE_USE_PREBUILT_DEPENDENCIES_DEFAULT OFF)
endif()
endif()
if (BUILD_PLATFORM STREQUAL "linux" AND BUILD_ARCH STREQUAL "x86")
# Prebuilt ffmpeg on x86 linux is built with --enable-asm, and lld chokes when trying to link with it.
set(OE_USE_LD_LLD_DEFAULT OFF)
else()
set(OE_USE_LD_LLD_DEFAULT ON)
endif()

# User-settable options.
set(OE_BUILD_TESTS ON CACHE BOOL "Build OpenEnroth tests.")
set(OE_USE_PREBUILT_DEPENDENCIES ${OE_USE_PREBUILT_DEPENDENCIES_DEFAULT} CACHE BOOL "Use prebuilt dependencies.")
set(OE_USE_CCACHE ON CACHE BOOL "Use ccache if available.")
set(OE_USE_SCCACHE ON CACHE BOOL "Use sccache if available, note that ccache takes precedence.")
set(OE_USE_LD_MOLD ON CACHE BOOL "Use mold linker if available.")
set(OE_USE_LD_LLD ON CACHE BOOL "Use lld linker if available, note that mold takes precedence.")
set(OE_USE_LD_LLD ${OE_USE_LD_LLD_DEFAULT} CACHE BOOL "Use lld linker if available, note that mold takes precedence.")
set(OE_USE_LD_GOLD ON CACHE BOOL "Use GNU gold linker if available, note that lld takes precedence.")

# Find ccache / sccache.
Expand Down

0 comments on commit 081c31e

Please sign in to comment.