Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: BSD
name: BSD, Haiku, OmniOS

on: [push, pull_request]

Expand All @@ -7,23 +7,34 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
operating_system: [ freebsd, netbsd, openbsd ]
operating_system: [ freebsd, haiku, netbsd, omnios, openbsd ]
architecture: [ arm64, x86-64 ]
include:
- operating_system: freebsd
version: '14.2'
pkginstall: sudo pkg update && sudo pkg install -y cmake git ninja pkgconf
version: '15.0'
pkginstall: sudo pkg update && sudo pkg install -y cmake git ninja
- operating_system: haiku
version: 'r1beta5'
pkginstall: pkgman refresh && pkgman install -y cmake git ninja
- operating_system: netbsd
version: '10.1'
pkginstall: sudo pkgin update && sudo pkgin -y install clang cmake git ninja-build pkgconf
pkginstall: sudo pkgin update && sudo pkgin -y install clang cmake git ninja-build
- operating_system: omnios
version: 'r151056'
pkginstall: sudo pkg refresh && sudo pkg install build-essential cmake git ninja
- operating_system: openbsd
version: '7.7'
pkginstall: sudo pkg_add -u && sudo pkg_add cmake git ninja pkgconf
version: '7.8'
pkginstall: sudo pkg_add -u && sudo pkg_add cmake git ninja
exclude:
- operating_system: haiku
architecture: arm64
- operating_system: omnios
architecture: arm64

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- uses: cross-platform-actions/action@v0.28.0
- uses: cross-platform-actions/action@v0.32.0
with:
operating_system: ${{ matrix.operating_system }}
architecture: ${{ matrix.architecture }}
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/msys2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: MSYS2

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- { os: windows-latest, sys: mingw32 }
- { os: windows-latest, sys: mingw64 }
- { os: windows-latest, sys: ucrt64 }
- { os: windows-latest, sys: clang64 }
- { os: windows-11-arm, sys: clangarm64 }
defaults:
run:
shell: msys2 {0}

steps:
- uses: actions/checkout@v6

- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
update: true
install: make
pacboy: >-
cmake:p
toolchain:p

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release

- name: Build
run: cmake --build ${{github.workspace}}/build --config Release
2 changes: 1 addition & 1 deletion .github/workflows/switch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
container: devkitpro/devkita64:latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/Switch.cmake
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vita.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
container: vitasdk/vitasdk:latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake
Expand Down
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,15 @@ if (BUILD_SHARED_LIBS)
target_compile_definitions(chdr PRIVATE _CRT_SECURE_NO_WARNINGS)
elseif(APPLE)
target_link_libraries(chdr PRIVATE -Wl,-dead_strip -Wl,-exported_symbol,_chd_*)
elseif(CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
target_link_libraries(chdr PRIVATE -Wl,--version-script ${CMAKE_CURRENT_SOURCE_DIR}/src/link.T)
else()
target_link_libraries(chdr PRIVATE -Wl,--version-script ${CMAKE_CURRENT_SOURCE_DIR}/src/link.T -Wl,--no-undefined)
include(CheckLinkerFlag)
check_linker_flag(C "LINKER:--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/link.T" LINKER_VERSION_SCRIPT_SUPPORTED)
if(LINKER_VERSION_SCRIPT_SUPPORTED)
target_link_options(chdr PRIVATE "LINKER:--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/link.T")
endif()
if(NOT CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
target_link_libraries(chdr PRIVATE -Wl,--no-undefined)
endif()
endif()

set_target_properties(chdr PROPERTIES C_VISIBILITY_PRESET hidden)
Expand Down