Skip to content
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

Windows builds #29

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from
Draft

Windows builds #29

wants to merge 22 commits into from

Conversation

fcremo
Copy link

@fcremo fcremo commented Apr 21, 2021

This PR adds/fixes Windows builds for:

  • llvm
  • mingw
  • gcc

It also switches the libcs from having a special @headers build to depending on a separate component for the headers (this was required by mingw which had to be installed in three phases).

Note: requires features from orchestra PR revng/revng-orchestra#25

@fcremo fcremo marked this pull request as ready for review April 22, 2021 09:12
@fcremo fcremo changed the title [WIP] Windows builds Windows builds Apr 22, 2021
.orchestra/config/components/llvm.yml Outdated Show resolved Hide resolved
.orchestra/config/components/llvm.yml Outdated Show resolved Hide resolved
.orchestra/config/components/llvm.yml Outdated Show resolved Hide resolved
.orchestra/config/components/llvm.yml Outdated Show resolved Hide resolved
.orchestra/config/components/llvm.yml Show resolved Hide resolved
.orchestra/config/global_options.yml Outdated Show resolved Hide resolved
.orchestra/config/lib/create_component.lib.yml Outdated Show resolved Hide resolved
@fcremo fcremo force-pushed the feature/windows branch from 4b4ea59 to 61f35c8 Compare May 3, 2021 16:15
@fcremo fcremo force-pushed the feature/windows branch 3 times, most recently from 8501d1e to 013718c Compare June 8, 2021 13:12
@fcremo fcremo force-pushed the feature/windows branch from 013718c to ab75992 Compare June 15, 2021 16:15
@aleclearmind
Copy link
Contributor

Update for when you resume working on this: I've pushed on this repository feature/windows. Please resume from there.

Notes:

  • I've created feature/windows branches for ui-qt-creator, llvm, revng and qemu. Some of them have dirty commits, but they should work.

Things that need to be done:

  • Factor out x86_64-w64-mingw32-clang into something similar to data.values.regular_c_compiler
  • Unify and factor out compiler flags specific for windows. Currently they are in multiple (namely, llvm, boost, ui/qt, ui/qt-creator, cmake.lib.yml) places and are slightly different.
  • Important: I have not fixed dependencies, they need to be fixed (e.g., windows builds need to depend on the Windows compiler).
  • Factor out $ORCHESTRA_ROOT/x86_64-w64-mingw32.

Some of this tasks call for a more in depth handling of cross-compiling components, but I'd like to postpone that.

@fcremo fcremo force-pushed the feature/windows branch from ab75992 to f18a488 Compare July 13, 2021 13:46
Copy link
Author

@fcremo fcremo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ale I aligned this PR to your feature/windows, looks all very good to me, I only had a couple of comments about differences between your branch and mine (see the review)

Comment on lines +38 to +40
(@ else: @)
make -j16
(@ end @)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The part setting install content in case ! is_windows is useless, we can just leave build_system: make

Comment on lines +38 to 40
(@= cmake(additional_cmake_args=cmake_opts) @) \
"(@= source_dir @)/llvm" \
-GNinja \
-DCMAKE_BUILD_RPATH="\$ORIGIN/../lib:$ORCHESTRA_ROOT/lib" \
-DCMAKE_INSTALL_RPATH="$RPATH_PLACEHOLDER/lib" \
-DCMAKE_BUILD_TYPE="(@= cmake_build_type @)" \
-DCMAKE_EXE_LINKER_FLAGS="(@= cflags @)" \
-DCMAKE_SHARED_LINKER_FLAGS="(@= cflags @)" \
-DCMAKE_MODULE_LINKER_FLAGS="(@= cflags @)" \
-DCMAKE_CXX_FLAGS="(@= cflags @)" \
-DLLVM_TARGETS_TO_BUILD="AArch64;AMDGPU;ARM;Mips;SystemZ;X86" \
-DLLVM_ENABLE_DUMP=ON \
-DLLVM_ENABLE_TERMINFO=OFF \
-DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF \
-DCMAKE_CXX_STANDARD=20 \
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why CMAKE_CXX_STANDARD is defined here and not by default_cmake_options or additional_cmake_options?

@fcremo fcremo marked this pull request as draft July 16, 2021 12:27
@aleclearmind
Copy link
Contributor

We need to integrate the precious suggestions by mstorsjo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants