diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index e822307e..f1db2b08 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -8,8 +8,16 @@ jobs: vmImage: ubuntu-16.04 strategy: matrix: - linux_variantdefault: - CONFIG: linux_variantdefault + linux_64_variantdefault: + CONFIG: linux_64_variantdefault + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: condaforge/linux-anvil-comp7 + linux_aarch64_variantdefault: + CONFIG: linux_aarch64_variantdefault + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: condaforge/linux-anvil-comp7 + linux_ppc64le_variantdefault: + CONFIG: linux_ppc64le_variantdefault UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: condaforge/linux-anvil-comp7 maxParallel: 8 diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 1d24e505..568ec85f 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -5,11 +5,11 @@ jobs: - job: osx pool: - vmImage: macOS-10.14 + vmImage: macOS-10.15 strategy: matrix: - osx_: - CONFIG: osx_ + osx_64_: + CONFIG: osx_64_ UPLOAD_PACKAGES: 'True' maxParallel: 8 timeoutInMinutes: 360 diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index b1346283..ab8cb2ba 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -8,8 +8,8 @@ jobs: vmImage: vs2017-win2016 strategy: matrix: - win_: - CONFIG: win_ + win_64_: + CONFIG: win_64_ UPLOAD_PACKAGES: 'True' maxParallel: 4 timeoutInMinutes: 360 diff --git a/.ci_support/linux_variantdefault.yaml b/.ci_support/linux_64_variantdefault.yaml similarity index 71% rename from .ci_support/linux_variantdefault.yaml rename to .ci_support/linux_64_variantdefault.yaml index ae4a5cc5..f2ae7aa6 100644 --- a/.ci_support/linux_variantdefault.yaml +++ b/.ci_support/linux_64_variantdefault.yaml @@ -8,12 +8,8 @@ cxx_compiler_version: - '7' docker_image: - condaforge/linux-anvil-comp7 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- '3.7' +target_platform: +- linux-64 variant: - default vc: diff --git a/.ci_support/linux_aarch64_variantdefault.yaml b/.ci_support/linux_aarch64_variantdefault.yaml new file mode 100644 index 00000000..52c5b786 --- /dev/null +++ b/.ci_support/linux_aarch64_variantdefault.yaml @@ -0,0 +1,22 @@ +BUILD: +- aarch64-conda_cos7-linux-gnu +cdt_arch: +- aarch64 +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cxx_compiler: +- gxx +cxx_compiler_version: +- '7' +docker_image: +- condaforge/linux-anvil-comp7 +target_platform: +- linux-aarch64 +variant: +- default +vc: +- '14' diff --git a/.ci_support/linux_ppc64le_variantdefault.yaml b/.ci_support/linux_ppc64le_variantdefault.yaml new file mode 100644 index 00000000..66dc987c --- /dev/null +++ b/.ci_support/linux_ppc64le_variantdefault.yaml @@ -0,0 +1,16 @@ +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cxx_compiler: +- gxx +cxx_compiler_version: +- '8' +docker_image: +- condaforge/linux-anvil-comp7 +target_platform: +- linux-ppc64le +variant: +- default +vc: +- '14' diff --git a/.ci_support/osx_.yaml b/.ci_support/osx_64_.yaml similarity index 91% rename from .ci_support/osx_.yaml rename to .ci_support/osx_64_.yaml index f4da2bf0..f469a0d6 100644 --- a/.ci_support/osx_.yaml +++ b/.ci_support/osx_64_.yaml @@ -12,6 +12,8 @@ macos_machine: - x86_64-apple-darwin13.4.0 macos_min_version: - '10.9' +target_platform: +- osx-64 variant: - default vc: diff --git a/.ci_support/win_.yaml b/.ci_support/win_64_.yaml similarity index 83% rename from .ci_support/win_.yaml rename to .ci_support/win_64_.yaml index 4948272e..c942b26b 100644 --- a/.ci_support/win_.yaml +++ b/.ci_support/win_64_.yaml @@ -4,6 +4,8 @@ channel_targets: - conda-forge main cxx_compiler: - vs2017 +target_platform: +- win-64 variant: - default vc: diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 0d5ef1c1..ccfbbb6d 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -29,8 +29,12 @@ source run_conda_forge_build_setup # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" +if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" +fi + conda build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ - --suppress-variables \ + --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" validate_recipe_outputs "${FEEDSTOCK_NAME}" diff --git a/LICENSE.txt b/LICENSE.txt index cba42cff..5f302793 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ BSD 3-clause license -Copyright (c) 2015-2019, conda-forge +Copyright (c) 2015-2020, conda-forge contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index e3cbf69e..7f186d40 100644 --- a/README.md +++ b/README.md @@ -29,24 +29,38 @@ Current build status - + - + - + + + + + + + @@ -55,12 +69,6 @@ Current build status - - - -
VariantStatus
linux_variantdefaultlinux_64_variantdefault - variant + variant
osxlinux_aarch64_variantdefault - variant + variant
winlinux_ppc64le_variantdefault - variant + variant + +
osx_64 + + variant + +
win_64 + + variant
Linux_ppc64le - ppc64le disabled -
Current release info diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e5306da9..6b346f50 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,5 +4,5 @@ jobs: - template: ./.azure-pipelines/azure-pipelines-linux.yml - - template: ./.azure-pipelines/azure-pipelines-osx.yml - - template: ./.azure-pipelines/azure-pipelines-win.yml \ No newline at end of file + - template: ./.azure-pipelines/azure-pipelines-win.yml + - template: ./.azure-pipelines/azure-pipelines-osx.yml \ No newline at end of file diff --git a/conda-forge.yml b/conda-forge.yml index 073f989a..d7e8529e 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -4,5 +4,8 @@ travis: secure: {BINSTAR_TOKEN: EjLNlquQ2jFVsxUtTcp3E50C0xUcTGYAW6al0PR1Qpxz5vs6jSpWLizx03XloiVwD4K5ykTAwe2FBNJ3Oh8uPIsXRldFzKQsr7RT+mzO9WjTakg/RD45EedEgQPYTtmBfT4etPnpOKX5l1GGSoxXgem3MkWzlPU2nbuXrXo9uHGnw6XdNBu5QNHEn81g8Ih9fNK85K7VD4s2vAdzP3EDvxbOl16H12UskCIvIsmfh/J5jjA1K1R1YFiXf+Lb99y5oCd9DDjUAUNx/dmGmS2cJBdvP45etS7W3Ddk7tIvHR7SvIvG052w7GAbkAsgUTbHST0pLsiaDZxRZlziqjUt+grFXejYhUhdBJfoJq4MXyiWF93WxEO9+BoDJQYmefqHibiS8g3tjdELhPcTdUfCUZeB9PXy1qlCCu440oid373KfIpgAsPm7OMGhGUASfkX9C1mZIgjBaU/Il32TnNxlzD18CTPbMgehElirvet7JCSV07CJuEJiZRqSE+t1aXiMMVukVDH+akW5RWF55yGzJAX8pICivglhoG7XdjGvKj0a+HjOXeoFLIRV07BiP+acZUdar8FbmPCnlX0t5nilTqp9cQAE8xXS09mTz6dQ9LEc8T8Bm1xGVOJ8SfxVwhsogIFGmNs0Cq7i2CF9VbwmNiIq+P//skvYfnuEA/PUJE=} provider: win: azure -# aarch64 and ppc64le are built manually because they don't fit in the CI timeouts conda_forge_output_validation: true +build_platform: + linux_ppc64le: linux_64 + linux_aarch64: linux_64 +test_on_native_only: true diff --git a/recipe/build.sh b/recipe/build.sh index 0df298f4..7c97d46b 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -4,15 +4,20 @@ IFS='.' read -r -a PKG_VER_ARRAY <<< "${PKG_VERSION}" sed -i.bak "s/libLTO.dylib/libLTO.${PKG_VER_ARRAY[0]}.dylib/g" lib/Driver/ToolChains/Darwin.cpp -mkdir build -cd build - if [[ "$variant" == "hcc" ]]; then - EXTRA_ARGS="$EXTRA_ARGS -DKALMAR_BACKEND=HCC_BACKEND_AMDGPU -DHCC_VERSION_STRING=2.7-19365-24e69cd8-24e69cd8-24e69cd8" - EXTRA_ARGS="$EXTRA_ARGS -DHCC_VERSION_MAJOR=2 -DHCC_VERSION_MINOR=7 -DHCC_VERSION_PATCH=19365" - EXTRA_ARGS="$EXTRA_ARGS -DKALMAR_SDK_COMMIT=24e69cd8 -DKALMAR_FRONTEND_COMMIT=24e69cd8 -DKALMAR_BACKEND_COMMIT=24e69cd8" + CMAKE_ARGS="$CMAKE_ARGS -DKALMAR_BACKEND=HCC_BACKEND_AMDGPU -DHCC_VERSION_STRING=2.7-19365-24e69cd8-24e69cd8-24e69cd8" + CMAKE_ARGS="$CMAKE_ARGS -DHCC_VERSION_MAJOR=2 -DHCC_VERSION_MINOR=7 -DHCC_VERSION_PATCH=19365" + CMAKE_ARGS="$CMAKE_ARGS -DKALMAR_SDK_COMMIT=24e69cd8 -DKALMAR_FRONTEND_COMMIT=24e69cd8 -DKALMAR_BACKEND_COMMIT=24e69cd8" +fi + +if [[ "$CC_FOR_BUILD" != "" && "$CC_FOR_BUILD" != "$CC" ]]; then + CMAKE_ARGS="${CMAKE_ARGS} -DLLVM_TABLEGEN_EXE=$BUILD_PREFIX/bin/llvm-tblgen -DNATIVE_LLVM_DIR=$BUILD_PREFIX/lib/cmake/llvm" + CMAKE_ARGS="${CMAKE_ARGS} -DCROSS_TOOLCHAIN_FLAGS_NATIVE=-DCMAKE_C_COMPILER=$CC_FOR_BUILD;-DCMAKE_CXX_COMPILER=$CXX_FOR_BUILD;-DCMAKE_C_FLAGS=-O2;-DCMAKE_CXX_FLAGS=-O2;-DCMAKE_EXE_LINKER_FLAGS=;-DCMAKE_MODULE_LINKER_FLAGS=;-DCMAKE_SHARED_LINKER_FLAGS=;-DCMAKE_STATIC_LINKER_FLAGS=;" fi +mkdir build +cd build + cmake \ -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_PREFIX_PATH=$PREFIX \ @@ -24,7 +29,7 @@ cmake \ -DLLVM_INCLUDE_DOCS=OFF \ -DLLVM_ENABLE_LIBXML2=OFF \ -DCMAKE_AR=$AR \ - $EXTRA_ARGS \ + $CMAKE_ARGS \ .. make -j${CPU_COUNT} diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 946e8088..a189bc0a 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,6 +1,6 @@ {% set version = "10.0.1" %} {% set major_version = version.split(".")[0] %} -{% set build_number = 0 %} +{% set build_number = 1 %} package: name: clang_packages @@ -15,6 +15,7 @@ source: - patches/0002-clang-add-conda-specific-env-var-CONDA_BUILD_SYSROOT.patch - patches/0003-clang-Fix-normalizeProgramName-s-handling-of-dots-ou.patch - patches/0001-Set-VERSION-in-osx-as-well.patch + - patches/cross-compile.diff #- patches/amd-roc-2.7.0.diff # [variant != "hcc"] #- patches/amd-roc-hcc-2.7.0.diff # [variant == "hcc"] folder: . @@ -37,6 +38,7 @@ requirements: # Building with ninja on windows for parallel builds - ninja # [win] - make # [unix] + - llvmdev =={{ version }} # [build_platform != target_platform] host: - libcxx {{ cxx_compiler_version }} # [osx] - llvmdev =={{ version }} @@ -74,6 +76,7 @@ outputs: - cmake >=3.4.3 - ninja # [win] - make # [unix] + - llvmdev =={{ version }} # [build_platform != target_platform] host: - {{ pin_subpackage("clang", exact=True) }} - {{ pin_subpackage("clangxx", exact=True) }} @@ -112,6 +115,7 @@ outputs: - cmake >=3.4.3 - ninja # [win] - make # [unix] + - llvmdev =={{ version }} # [build_platform != target_platform] host: - libcxx {{ cxx_compiler_version }} # [osx] - llvmdev =={{ version }} @@ -141,6 +145,7 @@ outputs: - cmake >=3.4.3 - ninja # [win] - make # [unix] + - llvmdev =={{ version }} # [build_platform != target_platform] host: - libcxx {{ cxx_compiler_version }} # [osx] - llvmdev =={{ version }} @@ -168,6 +173,7 @@ outputs: - cmake >=3.4.3 - ninja # [win] - make # [unix] + - llvmdev =={{ version }} # [build_platform != target_platform] host: - libcxx {{ cxx_compiler_version }} # [osx] - llvmdev =={{ version }} @@ -196,6 +202,7 @@ outputs: - cmake >=3.4.3 - ninja # [win] - make # [unix] + - llvmdev =={{ version }} # [build_platform != target_platform] host: - libcxx {{ cxx_compiler_version }} # [osx] - llvmdev =={{ version }} @@ -258,6 +265,7 @@ outputs: - cmake >=3.4.3 - ninja # [win] - make # [unix] + - llvmdev =={{ version }} # [build_platform != target_platform] host: - {{ pin_subpackage("clang", exact=True) }} - {{ pin_subpackage("clangxx", exact=True) }} @@ -281,7 +289,7 @@ outputs: noarch: python # Building this output using this recipe is only supported on unix # It can still be installed on Windows as it is marked as `noarch: python` - skip: true # [win or variant=="hcc"] + skip: true # [win or variant=="hcc" or (build_platform != target_platform)] track_features: - hcc # [variant=="hcc"] string: {{ variant }}_h{{ PKG_HASH }}_{{ build_number }} diff --git a/recipe/patches/cross-compile.diff b/recipe/patches/cross-compile.diff new file mode 100644 index 00000000..b7963cc8 --- /dev/null +++ b/recipe/patches/cross-compile.diff @@ -0,0 +1,19 @@ +--- CMakeLists.txt.old 2020-08-07 20:15:39.605174899 +0000 ++++ CMakeLists.txt 2020-08-07 20:20:01.383910098 +0000 +@@ -111,6 +111,16 @@ + option(LLVM_ENABLE_LIBXML2 "Use libxml2 if available." ON) + + include(AddLLVM) ++ if(CMAKE_CROSSCOMPILING) ++ set(LLVM_USE_HOST_TOOLS ON) ++ include(CrossCompile) ++ if (NOT NATIVE_LLVM_DIR) ++ message(FATAL_ERROR ++ "Crosscompiling standalone requires the variable NATIVE_LLVM_DIR ++ for building the native lldb-tblgen used during the build process.") ++ endif() ++ llvm_create_cross_target(Clang NATIVE "" Release -DLLVM_DIR=${NATIVE_LLVM_DIR}) ++ endif() + include(TableGen) + include(HandleLLVMOptions) + include(VersionFromVCS)