Skip to content

build with vs on windows#47

Merged
h-vetinari merged 5 commits into
conda-forge:mainfrom
h-vetinari:vs
Apr 11, 2024
Merged

build with vs on windows#47
h-vetinari merged 5 commits into
conda-forge:mainfrom
h-vetinari:vs

Conversation

@h-vetinari

Copy link
Copy Markdown
Member

Trying to address #46

@conda-forge-webservices

Copy link
Copy Markdown

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@jcapriot

Copy link
Copy Markdown

Just FYI I built this locally using an environment as close as I could get to the azure environment and it worked (not sure why it's erroring out here though).

These were the CMAKE settings:

...
cd build

cmake -G "Ninja" ^
    -DCMAKE_BUILD_TYPE="Release" ^
    -DCMAKE_CXX_STANDARD=17 ^
    -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ^
    -DCMAKE_INSTALL_PREFIX:PATH=%LIBRARY_PREFIX% ^
    -DFLANG_INCLUDE_TESTS=OFF ^
    -DCMAKE_PREFIX_PATH:PATH=%LIBRARY_PREFIX% ^
    -DLLVM_LIT_ARGS=-v ^
    -DLLVM_CMAKE_DIR:PATH=%LIBRARY_LIB%\cmake\llvm ^
    -DCLANG_DIR:PATH=%LIBRARY_LIB%\cmake\clang ^
    -DMLIR_DIR:PATH=%LIBRARY_LIB%\cmake\mlir ^
    -S ..\flang

A few things from my local build:

  • Current build lists LLVM_BUILD_MAIN_SRC_DIR and TARGET_ARCHITECTURE as unused.
  • Defining the path to the cmake configuration files for llvm, clang, and mlir, seemed sufficient.
    • Wasn't a need to set CMAKE_PREFIX_PATH to more than just the library.
    • lit was already in the Path (due to it being listed as a requirement).
    • CMAKE_MODULE_PATH seemed unneeded as well. (I imagine it finds what it needs from the llvm cmake configuration files)
    • Didn't need to add -DAVOID_NATIVE_UINT128_T=1 to CXXFLAGS.

Just some things to consider,

@h-vetinari

Copy link
Copy Markdown
Member Author

Thanks for testing this out!

not sure why it's erroring out here though

Azure agents are puny, resp. flang compilation has a monster memory footprint, and the default parallelism (or any parallelism actually) blows out the memory we have (including 8GB swapfile...)

Current build lists LLVM_BUILD_MAIN_SRC_DIR and TARGET_ARCHITECTURE as unused.

Thanks, those seem to be leftovers, let's delete them.

Defining the path to the cmake configuration files for llvm, clang, and mlir, seemed sufficient.

The other variables don't hurt at the moment, so I'm inclined to leave them.

Didn't need to add -DAVOID_NATIVE_UINT128_T=1 to CXXFLAGS.

We definitely did need it when building with clang - AFAIU, the upstream flang build will decide to use uint128 based on whether the used compiler supports them - clang-cl does, msvc doesn't, so we need that variable for the former, not the latter (not 100% sure, but this is my understanding).

@h-vetinari h-vetinari marked this pull request as ready for review April 11, 2024 06:29
@h-vetinari h-vetinari requested a review from isuruf as a code owner April 11, 2024 06:29
@h-vetinari h-vetinari merged commit d1c6d48 into conda-forge:main Apr 11, 2024
@h-vetinari h-vetinari deleted the vs branch April 11, 2024 11:12
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