Skip to content

Commit 2b7c141

Browse files
committed
Unify OSX and Linux paths related to cross-compiling in vcpkg portfile
1 parent 4874f84 commit 2b7c141

File tree

4 files changed

+7
-157
lines changed

4 files changed

+7
-157
lines changed

.github/workflows/MainDistributionPipeline.yml

+2-11
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,12 @@ jobs:
1818
with:
1919
extension_name: mysql_scanner
2020
duckdb_version: 'v0.10.2'
21-
exclude_archs: 'osx_amd64;osx_arm64;wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools'
21+
exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools'
2222
build_duckdb_shell: false
2323

24-
# Note: this workaround is required for building MacOS where extra toolchain config is required
25-
duckdb-stable-build-macos:
26-
name: Build extension binaries
27-
uses: ./.github/workflows/_extension_distribution_macos.yml
28-
with:
29-
duckdb_version: v0.10.2
30-
extension_name: mysql_scanner
31-
32-
3324
duckdb-stable-deploy:
3425
name: Deploy extension binaries
35-
needs: [duckdb-stable-build, duckdb-stable-build-macos]
26+
needs: duckdb-stable-build
3627
uses: duckdb/extension-ci-tools/.github/workflows/_extension_deploy.yml@main
3728
secrets: inherit
3829
with:

.github/workflows/MysqlTests.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454

5555
- uses: actions/setup-python@v2
5656
with:
57-
python-version: '3.7'
57+
python-version: '3.11'
5858

5959
- name: Setup vcpkg
6060
uses: lukka/[email protected]
@@ -70,9 +70,6 @@ jobs:
7070
- name: Build extension
7171
shell: bash
7272
run: |
73-
# needed for MySQL cross compilation - see https://mariadb.com/kb/en/cross-compiling-mariadb/
74-
echo 'SET(STACK_DIRECTION -1)' >> ${VCPKG_TOOLCHAIN_PATH}
75-
echo 'SET(HAVE_IB_GCC_ATOMIC_BUILTINS 0)' >> ${VCPKG_TOOLCHAIN_PATH}
7673
make release
7774
7875
- name: Test Extension

.github/workflows/_extension_distribution_macos.yml

-134
This file was deleted.

vcpkg_ports/libmysql/portfile.cmake

+4-8
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,18 @@ endif()
2222

2323
set(CROSS_COMPILING "")
2424
set(STACK_DIRECTION "")
25-
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
25+
if(NOT VCPKG_TARGET_IS_WINDOWS)
2626
set(STACK_DIRECTION -DSTACK_DIRECTION=-1)
27-
else()
28-
# ARM builds are always cross compiled
27+
set(HAVE_IB_GCC_ATOMIC_BUILTINS 0)
28+
set(CROSS_COMPILING -DCMAKE_CROSSCOMPILING=1)
29+
# Non-Windows builds are always cross-compiled
2930
# as such we build the executables (comp_sql, uca9dump, comp_client_err) separately
3031
set(PATCH_FILES
3132
${PATCH_FILES}
3233
remove_executables.patch
3334
)
34-
if(VCPKG_TARGET_IS_LINUX)
35-
set(CROSS_COMPILING -DCMAKE_CROSSCOMPILING=1)
36-
set(STACK_DIRECTION -DSTACK_DIRECTION=-1)
37-
endif()
3835
endif()
3936

40-
4137
vcpkg_from_github(
4238
OUT_SOURCE_PATH SOURCE_PATH
4339
REPO mysql/mysql-server

0 commit comments

Comments
 (0)