Skip to content

Commit

Permalink
llvm: Split openmp and LIBOMP_INSTALL_ALIASES=OFF
Browse files Browse the repository at this point in the history
  • Loading branch information
mingwandroid committed Aug 13, 2017
1 parent deccc4c commit 535ed00
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
3 changes: 2 additions & 1 deletion cross-compilers/llvm/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ _cmake_config+=(-DHAVE_TERMINFO_TERMINFO=OFF)
_cmake_config+=(-DHAVE_TERMINFO_TINFO=OFF)
_cmake_config+=(-DHAVE_TERMIOS_H=OFF)
_cmake_config+=(-DCLANG_ENABLE_LIBXML=OFF)
_cmake_config+=(-DLIBOMP_INSTALL_ALIASES=OFF)
# Once we are using our libc++ (not until llvm_build_final), it will be single-arch only and not setting
# this causes link failures building the santizers since they respect DARWIN_osx_ARCHS. We may as well
# save some compilation time by setting this for all of our llvm builds.
Expand Down Expand Up @@ -288,7 +289,7 @@ else
fi

${SED} -i.orig '/\/clang|lld|lldb|polly\/cmake_install.cmake/d' llvm_build_final/tools/cmake_install.cmake
${SED} -i.orig '/\/compiler-rt|libcxxabi|libcxx|libunwind|tapi\/cmake_install.cmake/d' llvm_build_final/projects/cmake_install.cmake
${SED} -i.orig '/\/compiler-rt|libcxxabi|libcxx|libunwind|openmp|tapi\/cmake_install.cmake/d' llvm_build_final/projects/cmake_install.cmake


# There is no way of having libc++.dylib instruct the linker to add a relative rpath, though that would be nice.
Expand Down
13 changes: 13 additions & 0 deletions cross-compilers/llvm/install-openmp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

. activate "${PREFIX}"
cd "${SRC_DIR}"

DEST="${PWD}"/install-openmp
[[ -d "${DEST}" ]] && rm -rf "${DEST}"
pushd llvm_build_final/projects/openmp
make install DESTDIR="${DEST}"
popd
pushd "${DEST}"/"${PWD}"/prefix
cp -Rf * "${PREFIX}"
popd
22 changes: 19 additions & 3 deletions cross-compilers/llvm/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ outputs:
# Involved packages were:
# Mismatching package: llvm; consumer package: clang
# Mismatching package: llvm; consumer package: lldb
- {{ pin_subpackage('llvm', min_pin='x.x.x', max_pin='x.x.x') }}
- {{ pin_subpackage('llvm', exact=True) }}
- {{ pin_subpackage('compiler-rt_' ~ cross_target_platform, exact=True) }}
# Normally, this dep would be injected via run_exports by the jinja2 compiler() function
# but that is not possible when bootstrapping as it would cause a build dependency cycle.
Expand Down Expand Up @@ -243,7 +243,7 @@ outputs:
# # Involved packages were:
# # Mismatching package: llvm; consumer package: clang
# # Mismatching package: llvm; consumer package: lldb
# - {{ pin_subpackage('llvm', min_pin='x.x.x', max_pin='x.x.x') }}
# - {{ pin_subpackage('llvm', exact=True) }}
# # Normally, this dep would be injected via run_exports by the jinja2 compiler() function
# # but that is not possible when bootstrapping as it would cause a build dependency cycle.
# - {{ pin_subpackage('libcxx_' ~ cross_target_platform, exact=True) }} # [osx]
Expand All @@ -267,7 +267,7 @@ outputs:
run:
- {{ pin_subpackage('clang', exact=True) }}
run_exports:
- {{ pin_subpackage('libcxx_' ~ cross_target_platform) }}
- {{ pin_subpackage('libcxx_' ~ cross_target_platform, min_pin='x.x.x.x.x.x.x.x.x', max_pin='None') }}
about:
home: http://clang.llvm.org/
license: University of Illinois/NCSA Open Source License
Expand Down Expand Up @@ -354,6 +354,22 @@ outputs:
libc++abi is a new implementation of low level support for a standard
C++ library
- name: openmp_{{ cross_target_platform }}
script: install-openmp.sh
target: {{ cross_target_platform }}
requirements:
build:
- cmake
about:
home: http://openmp.llvm.org/
license: MIT license or UIUC License
license_family: Other
license_file: projects/openmp/LICENSE.txt
summary: Support for the OpenMP language
description: |
The OpenMP subproject of LLVM contains the components required to build an
executable OpenMP program that are outside the compiler itself.
- name: compiler-rt_{{ cross_target_platform }}
script: install-compiler-rt.sh
target: {{ cross_target_platform }}
Expand Down

0 comments on commit 535ed00

Please sign in to comment.