File tree 3 files changed +21
-5
lines changed
3 files changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,12 @@ git checkout "v$INSTALL_VERSION" && git submodule init && git submodule update
21
21
patch -p1 < ../.github/scripts/libff.patch
22
22
23
23
sed -i ' s/find_library(GMP_LIBRARY gmp)/find_library(GMP_LIBRARY NAMES libgmp.a)/' CMakeLists.txt
24
+ # This ends up causing the system headers to be included with -I and
25
+ # thus they override the GHC mingw compiler ones. So this removes it
26
+ # and re-adds the include with idirafter via the toolchain file
27
+ sed -i ' /INCLUDE_DIRECTORIES.*OPENSSL_INCLUDE_DIR/d' CMakeLists.txt
24
28
PREFIX=" $HOME /.local"
25
- ARGS=(" -DCMAKE_INSTALL_PREFIX=$PREFIX " " -DWITH_PROCPS=OFF" " -G" " Ninja" )
29
+ ARGS=(" -DCMAKE_INSTALL_PREFIX=$PREFIX " " -DWITH_PROCPS=OFF" " -G" " Ninja" " -DCMAKE_TOOLCHAIN_FILE= $PWD /../.github/scripts/windows-ghc-toolchain.cmake " )
26
30
CXXFLAGS=" -fPIC"
27
31
28
32
mkdir -p build
Original file line number Diff line number Diff line change
1
+ set (CMAKE_SYSTEM_NAME Windows)
2
+
3
+ set (CMAKE_C_COMPILER "$ENV{HASKELL_MINGW_PATH} /bin/cc.exe" )
4
+ set (CMAKE_CXX_COMPILER "$ENV{HASKELL_MINGW_PATH} /bin/c++.exe" )
5
+
6
+ set (CMAKE_C_FLAGS "-idirafter D:/a/_temp/msys64/clang64/include" )
7
+ set (CMAKE_CXX_FLAGS "-idirafter D:/a/_temp/msys64/clang64/include" )
8
+
9
+ set (CMAKE_FIND_ROOT_PATH "$ENV{HASKELL_MINGW_PATH} " )
10
+ set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
11
+ set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
12
+ set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
Original file line number Diff line number Diff line change @@ -160,11 +160,11 @@ jobs:
160
160
run : |
161
161
export PATH="$HASKELL_PATHS:$PATH"
162
162
cabal configure --disable-documentation --enable-executable-static --enable-executable-stripping \
163
- --extra-include-dirs="$(cygpath -m "$HASKELL_MINGW_PATH/x86_64-w64-mingw32/include")" --extra- lib-dirs="$(cygpath -m "$HASKELL_MINGW_PATH/x86_64-w64-mingw32/lib")" \
164
- --extra-include-dirs="$(cygpath -m "$HASKELL_MINGW_PATH/include")" --extra- lib-dirs="$(cygpath -m "$HASKELL_MINGW_PATH/lib")" \
165
- --extra-include-dirs="D:/a/_temp/msys64/clang64/include" --extra- lib-dirs="D:/a/_temp/msys64/clang64/lib" \
163
+ --extra-lib-dirs="$(cygpath -m "$HASKELL_MINGW_PATH/x86_64-w64-mingw32/lib")" \
164
+ --extra-lib-dirs="$(cygpath -m "$HASKELL_MINGW_PATH/lib")" \
165
+ --extra-lib-dirs="D:/a/_temp/msys64/clang64/lib" \
166
166
--extra-include-dirs="$HOME/.local/include" --extra-lib-dirs="$HOME/.local/lib" \
167
- --ghc-options=-pgml="$(cygpath -m "$HASKELL_MINGW_PATH/bin/clang.exe")" -fstatic-secp256k1 --constraint="zlib +bundled-c-zlib"
167
+ --ghc-options=-pgml="$(cygpath -m "$HASKELL_MINGW_PATH/bin/clang.exe") -optc-idirafter -optcD:/a/_temp/msys64/clang64/include -optcxx-idirafter -optcxxD:/a/_temp/msys64/clang64/include " -fstatic-secp256k1 --constraint="zlib +bundled-c-zlib"
168
168
cabal build --dry-run
169
169
# The last step generates dist-newstyle/cache/plan.json for the cache key.
170
170
You can’t perform that action at this time.
0 commit comments