-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add mingw cross-compiler #103
Conversation
@@ -0,0 +1,21 @@ | |||
cmake_minimum_required(VERSION 3.16) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather this be part of project_options
This comment was marked as resolved.
This comment was marked as resolved.
Powershell support is added. Do you want to update this PR? |
Yes ... Sry, I will update it later. |
Note mingw_build:
- task: build_template
vars:
FEATURE_TESTS: OFF
CMAKE_BUILD_TYPE: Release
CONFIGURE_FLAGS: -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE="/home/cmake/x86_64-w64-mingw32.toolchain.cmake" -DVCPKG_TARGET_TRIPLET="x64-mingw-dynamic" I added it for Testing in my local repo |
I have some problems running // yay can't run as root, so skip update
if (!didUpdate && aur != 'yay') {
execRootSync(pacman, ["-Sy", "--noconfirm"])
didUpdate = true
}
if (!didInit && aur != 'yay') {
// install base-devel
execRootSync(pacman, ["-Sy", "--noconfirm", "base-devel"])
didInit = true
} I skip the update part, idk if this is OK. @aminya I also did a big mistake in "update", change it to |
Not an fedora user, just installed mingw with Have some problem building the example:
|
Could you make a PR to add the MinGW toolchain in project_options? |
I fixed the docker builds and add fedora- and arch-linux-support. |
tbh I don't really know how, I can add a When using vcpkg, for a successful build I need to add some flags: |
See my comment at aminya/project_options#140 (comment) |
* add docker mingw tests * add node16 test
c04af03
to
43fd660
Compare
|
20db333
to
67246ba
Compare
67246ba
to
a2d7d8f
Compare
…eature/cross-mingw
…up-cpp into feature/cross-mingw
c58e59a
to
623beb0
Compare
…up-cpp into feature/cross-mingw
@aminya For the "arch linux + yay"-Problem, I would suggest to auto-detect some popular AUR-Helper/pacman wrapper. A CLI option for arch-linux-user would be also nice: --pacman-wrapper yay |
We can comment out the Fedora Mingw and Arch Mingw inside CI for now if the errors are not fixable. |
agree, the powershell problem is a bug of its own and for the fedora error, I need to do more testing with project_options (MinGW installation works though) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
Hi,
I was experimenting with gcc-mingw for ubuntu and cross-compiling.
So I added gcc-mingw-w64 into setup-cpp.
It seems to work in a docker container and builds.
pnpm build && docker build -f ./dev/docker/ubuntu_node.mingw.dockerfile -t setup_cpp:ubuntu-mingw .
TODOs:
add powershell into setup-cpp -Add powershell tool #105./setup_cpp.js --powershell true
(this is a task on it's own) [help wanted]powershell
for vcpkg (Could not find Z_VCPKG_BUILTIN_POWERSHELL_PATH using the following names powershell
)mingw-w64
via AUR (We need something likesetupAURPack
)mingw64-gcc
setup toolchain for cmake- Add toolchain support project_options#140-DVCPKG_TARGET_TRIPLET="x64-mingw-dynamic"
for vcpkg and cmake toolchain-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE="/home/cmake/x86_64-w64-mingw32-toolchain.cmake"
getVersion
,DefaultUbuntuVersion
, etc. @aminyaNotes:
dev/cpp_vcpkg_project
for testing