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

Fix path on windows #79

Merged
merged 2 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
mkdir build
cd build

:: cut off any extensions after "XY.0.0";
:: mainly aimed at ".rcX", which is not part of the installation path
set PKG_VERSION=%PKG_VERSION:~0,-4%

set BUILD_CONFIG=Release
set "CC=clang-cl.exe"
set "CXX=clang-cl.exe"
Expand All @@ -27,5 +31,9 @@ if %ERRORLEVEL% neq 0 exit 1
cmake --install .
if %ERRORLEVEL% neq 0 exit 1

:: Also install into %PREFIX%\lib (!= %PREFIX%\Library\lib, the default on win)
:: because compiler-rt_win-64 is noarch and needs to be installable on linux,
:: where we don't want the "\Library"; aside from removing that directory,
:: the paths are the same. Separation into proper outputs happens in the recipe.
mkdir %PREFIX%\lib\clang\%PKG_VERSION%\lib\windows
copy %INSTALL_PREFIX%\lib\windows\* %PREFIX%\lib\clang\%PKG_VERSION%\lib\windows\
19 changes: 12 additions & 7 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ source:
- patches/0002-compiler-rt-Make-7.0.0-compatible-with-10.9-SDK.patch

build:
number: 0
number: 1

requirements:
build:
Expand Down Expand Up @@ -47,11 +47,14 @@ outputs:
run_constrained:
- compiler-rt {{ version }}
files:
- lib/clang/{{ prod_ver }}/lib
- lib/clang/{{ prod_ver }}/lib # [unix]
# avoid "Library\" for noarch output
- lib\clang\{{ prod_ver }}\lib # [win]
test:
commands:
- echo {{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }}
- test -f $PREFIX/lib/clang/{{ prod_ver }}/lib/darwin/libclang_rt.osx.a # [osx]
- test -f $PREFIX/lib/clang/{{ prod_ver }}/lib/darwin/libclang_rt.osx.a # [osx]
- if not exist %PREFIX%\lib\clang\{{ prod_ver }}\lib\windows\clang_rt.builtins-x86_64.lib exit 1 # [win]

- name: compiler-rt
requirements:
Expand All @@ -65,17 +68,19 @@ outputs:
files:
- lib/clang/{{ prod_ver }}/share # [unix]
- lib/clang/{{ prod_ver }}/include # [unix]
- Library/lib/clang/{{ version }}/share # [win]
- Library/lib/clang/{{ version }}/include # [win]
- Library/lib/clang/{{ version }}/lib # [win]
# standard windows layout for arch-specific output
- Library\lib\clang\{{ prod_ver }}\share # [win]
- Library\lib\clang\{{ prod_ver }}\include # [win]
- Library\lib\clang\{{ prod_ver }}\lib # [win]
test:
# files:
# - test.c.in
commands:
# {% set NEW_TARGET="10." ~ (((MACOSX_DEPLOYMENT_TARGET|default("10.13")).split(".")[1])|int + 1) %}
# - sed "s/@MACOSX_DEPLOYMENT_TARGET@/{{ NEW_TARGET }}/g" test.c.in > test.c
# - clang -mmacosx-version-min={{ MACOSX_DEPLOYMENT_TARGET }} test.c # [osx]
- test -f $PREFIX/lib/clang/{{ prod_ver }}/include/sanitizer/asan_interface.h # [unix]
- test -f $PREFIX/lib/clang/{{ prod_ver }}/include/sanitizer/asan_interface.h # [unix]
- if not exist %LIBRARY_LIB%\clang\{{ prod_ver }}\lib\windows\clang_rt.builtins-x86_64.lib exit 1 # [win]

about:
home: http://llvm.org/
Expand Down