Skip to content

Commit

Permalink
Merge pull request #79 from h-vetinari/rc
Browse files Browse the repository at this point in the history
Fix path on windows
  • Loading branch information
h-vetinari authored Jul 31, 2023
2 parents 4ec0d42 + e94a48d commit 5b8015d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
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

0 comments on commit 5b8015d

Please sign in to comment.