diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 69c2bb9..2fa5de5 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -8,11 +8,14 @@ jobs: vmImage: ubuntu-16.04 strategy: matrix: - linux_: - CONFIG: linux_ + linux_64_cross_platformosx-64macos_machinex86_64-apple-darwin13.4.0target_platformlinux-64: + CONFIG: linux_64_cross_platformosx-64macos_machinex86_64-apple-darwin13.4.0target_platformlinux-64 + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: condaforge/linux-anvil-comp7 + linux_64_cross_platformosx-arm64macos_machinearm64-apple-darwin20.0.0target_platformlinux-64: + CONFIG: linux_64_cross_platformosx-arm64macos_machinearm64-apple-darwin20.0.0target_platformlinux-64 UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: condaforge/linux-anvil-comp7 - maxParallel: 8 timeoutInMinutes: 360 steps: @@ -33,7 +36,6 @@ jobs: export CI=azure export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) - export UPLOAD_ON_BRANCH="master" .scripts/run_docker_build.sh displayName: Run docker build env: diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 2f0399c..fcc1ce6 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -5,13 +5,21 @@ jobs: - job: osx pool: - vmImage: macOS-10.14 + vmImage: macOS-10.15 strategy: matrix: - osx_: - CONFIG: osx_ + osx_64_cross_platformosx-64macos_machinex86_64-apple-darwin13.4.0target_platformosx-64: + CONFIG: osx_64_cross_platformosx-64macos_machinex86_64-apple-darwin13.4.0target_platformosx-64 + UPLOAD_PACKAGES: 'True' + osx_64_cross_platformosx-arm64macos_machinearm64-apple-darwin20.0.0target_platformosx-64: + CONFIG: osx_64_cross_platformosx-arm64macos_machinearm64-apple-darwin20.0.0target_platformosx-64 + UPLOAD_PACKAGES: 'True' + osx_arm64_cross_platformosx-64macos_machinex86_64-apple-darwin13.4.0target_platformosx-arm64: + CONFIG: osx_arm64_cross_platformosx-64macos_machinex86_64-apple-darwin13.4.0target_platformosx-arm64 + UPLOAD_PACKAGES: 'True' + osx_arm64_cross_platformosx-arm64macos_machinearm64-apple-darwin20.0.0target_platformosx-arm64: + CONFIG: osx_arm64_cross_platformosx-arm64macos_machinearm64-apple-darwin20.0.0target_platformosx-arm64 UPLOAD_PACKAGES: 'True' - maxParallel: 8 timeoutInMinutes: 360 steps: @@ -21,7 +29,6 @@ jobs: export OSX_FORCE_SDK_DOWNLOAD="1" export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) - export UPLOAD_ON_BRANCH="master" ./.scripts/run_osx_build.sh displayName: Run OSX build env: diff --git a/.ci_support/linux_.yaml b/.ci_support/linux_64_cross_platformosx-64macos_machinex86_64-apple-darwin13.4.0target_platformlinux-64.yaml similarity index 75% rename from .ci_support/linux_.yaml rename to .ci_support/linux_64_cross_platformosx-64macos_machinex86_64-apple-darwin13.4.0target_platformlinux-64.yaml index c543ec2..74e261b 100644 --- a/.ci_support/linux_.yaml +++ b/.ci_support/linux_64_cross_platformosx-64macos_machinex86_64-apple-darwin13.4.0target_platformlinux-64.yaml @@ -2,6 +2,8 @@ channel_sources: - conda-forge,defaults channel_targets: - conda-forge main +cross_platform: +- osx-64 cxx_compiler: - gxx cxx_compiler_version: @@ -17,5 +19,10 @@ pin_run_as_build: max_pin: x zlib: max_pin: x.x +target_platform: +- linux-64 +zip_keys: +- - macos_machine + - cross_platform zlib: - '1.2' diff --git a/.ci_support/linux_64_cross_platformosx-arm64macos_machinearm64-apple-darwin20.0.0target_platformlinux-64.yaml b/.ci_support/linux_64_cross_platformosx-arm64macos_machinearm64-apple-darwin20.0.0target_platformlinux-64.yaml new file mode 100644 index 0000000..f4f0b0e --- /dev/null +++ b/.ci_support/linux_64_cross_platformosx-arm64macos_machinearm64-apple-darwin20.0.0target_platformlinux-64.yaml @@ -0,0 +1,28 @@ +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cross_platform: +- osx-arm64 +cxx_compiler: +- gxx +cxx_compiler_version: +- '7' +docker_image: +- condaforge/linux-anvil-comp7 +libuuid: +- 2.32.1 +macos_machine: +- arm64-apple-darwin20.0.0 +pin_run_as_build: + libuuid: + max_pin: x + zlib: + max_pin: x.x +target_platform: +- linux-64 +zip_keys: +- - macos_machine + - cross_platform +zlib: +- '1.2' diff --git a/.ci_support/osx_.yaml b/.ci_support/osx_64_cross_platformosx-64macos_machinex86_64-apple-darwin13.4.0target_platformosx-64.yaml similarity index 73% rename from .ci_support/osx_.yaml rename to .ci_support/osx_64_cross_platformosx-64macos_machinex86_64-apple-darwin13.4.0target_platformosx-64.yaml index f21e69d..e574510 100644 --- a/.ci_support/osx_.yaml +++ b/.ci_support/osx_64_cross_platformosx-64macos_machinex86_64-apple-darwin13.4.0target_platformosx-64.yaml @@ -4,16 +4,21 @@ channel_sources: - conda-forge,defaults channel_targets: - conda-forge main +cross_platform: +- osx-64 cxx_compiler: - clang_bootstrap cxx_compiler_version: - '*' macos_machine: - x86_64-apple-darwin13.4.0 -macos_min_version: -- '10.9' pin_run_as_build: zlib: max_pin: x.x +target_platform: +- osx-64 +zip_keys: +- - macos_machine + - cross_platform zlib: - '1.2' diff --git a/.ci_support/osx_64_cross_platformosx-arm64macos_machinearm64-apple-darwin20.0.0target_platformosx-64.yaml b/.ci_support/osx_64_cross_platformosx-arm64macos_machinearm64-apple-darwin20.0.0target_platformosx-64.yaml new file mode 100644 index 0000000..d098e76 --- /dev/null +++ b/.ci_support/osx_64_cross_platformosx-arm64macos_machinearm64-apple-darwin20.0.0target_platformosx-64.yaml @@ -0,0 +1,24 @@ +MACOSX_DEPLOYMENT_TARGET: +- '10.9' +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cross_platform: +- osx-arm64 +cxx_compiler: +- clang_bootstrap +cxx_compiler_version: +- '*' +macos_machine: +- arm64-apple-darwin20.0.0 +pin_run_as_build: + zlib: + max_pin: x.x +target_platform: +- osx-64 +zip_keys: +- - macos_machine + - cross_platform +zlib: +- '1.2' diff --git a/.ci_support/osx_arm64_cross_platformosx-64macos_machinex86_64-apple-darwin13.4.0target_platformosx-arm64.yaml b/.ci_support/osx_arm64_cross_platformosx-64macos_machinex86_64-apple-darwin13.4.0target_platformosx-arm64.yaml new file mode 100644 index 0000000..b061692 --- /dev/null +++ b/.ci_support/osx_arm64_cross_platformosx-64macos_machinex86_64-apple-darwin13.4.0target_platformosx-arm64.yaml @@ -0,0 +1,24 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +channel_sources: +- https://conda-web.anaconda.org/conda-forge,conda-forge/label/llvm_rc +channel_targets: +- conda-forge main +cross_platform: +- osx-64 +cxx_compiler: +- clang_bootstrap +cxx_compiler_version: +- '*' +macos_machine: +- x86_64-apple-darwin13.4.0 +pin_run_as_build: + zlib: + max_pin: x.x +target_platform: +- osx-arm64 +zip_keys: +- - macos_machine + - cross_platform +zlib: +- '1.2' diff --git a/.ci_support/osx_arm64_cross_platformosx-arm64macos_machinearm64-apple-darwin20.0.0target_platformosx-arm64.yaml b/.ci_support/osx_arm64_cross_platformosx-arm64macos_machinearm64-apple-darwin20.0.0target_platformosx-arm64.yaml new file mode 100644 index 0000000..71e6a37 --- /dev/null +++ b/.ci_support/osx_arm64_cross_platformosx-arm64macos_machinearm64-apple-darwin20.0.0target_platformosx-arm64.yaml @@ -0,0 +1,24 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +channel_sources: +- https://conda-web.anaconda.org/conda-forge,conda-forge/label/llvm_rc +channel_targets: +- conda-forge main +cross_platform: +- osx-arm64 +cxx_compiler: +- clang_bootstrap +cxx_compiler_version: +- '*' +macos_machine: +- arm64-apple-darwin20.0.0 +pin_run_as_build: + zlib: + max_pin: x.x +target_platform: +- osx-arm64 +zip_keys: +- - macos_machine + - cross_platform +zlib: +- '1.2' diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b40143b..a6a3390 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @davidbrochart @isuruf @mingwandroid \ No newline at end of file +* @davidbrochart @isuruf @katietz @mingwandroid \ No newline at end of file diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 0d5ef1c..8a4b0d3 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -19,7 +19,7 @@ conda-build: CONDARC -conda install --yes --quiet conda-forge-ci-setup=3 conda-build pip -c conda-forge +conda install --yes --quiet "conda-forge-ci-setup=3" conda-build pip -c conda-forge # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -29,13 +29,29 @@ source run_conda_forge_build_setup # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" -conda build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ - --suppress-variables \ - --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" -validate_recipe_outputs "${FEEDSTOCK_NAME}" +if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" +fi + -if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then - upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" +if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then + if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" + fi + conda debug "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + ${EXTRA_CB_OPTIONS:-} \ + --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" + # Drop into an interactive shell + /bin/bash +else + conda build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + --suppress-variables ${EXTRA_CB_OPTIONS:-} \ + --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" + validate_recipe_outputs "${FEEDSTOCK_NAME}" + + if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then + upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" + fi fi touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}" \ No newline at end of file diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index e4d5bab..87ba4db 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -74,6 +74,8 @@ docker run ${DOCKER_RUN_ARGS} \ -e CI \ -e FEEDSTOCK_NAME \ -e CPU_COUNT \ + -e BUILD_WITH_CONDA_DEBUG \ + -e BUILD_OUTPUT_ID \ -e BINSTAR_TOKEN \ -e FEEDSTOCK_TOKEN \ -e STAGING_BINSTAR_TOKEN \ diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index d7e3c06..3675dac 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -23,7 +23,7 @@ source ${HOME}/miniforge3/etc/profile.d/conda.sh conda activate base echo -e "\n\nInstalling conda-forge-ci-setup=3 and conda-build." -conda install -n base --quiet --yes conda-forge-ci-setup=3 conda-build pip +conda install -n base --quiet --yes "conda-forge-ci-setup=3" conda-build pip @@ -47,7 +47,12 @@ set -e echo -e "\n\nMaking the build clobber file and running the build." make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml -conda build ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml + +if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" +fi + +conda build ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml ${EXTRA_CB_OPTIONS:-} validate_recipe_outputs "${FEEDSTOCK_NAME}" if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then diff --git a/LICENSE.txt b/LICENSE.txt index cba42cf..5f30279 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 9321e00..b82d8f2 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,9 @@ Home: https://github.com/tpoechtrager/cctools-port Package license: APSL-2.0 -Feedstock license: BSD-3-Clause - -Summary: Darwin Mach-O linker - +Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/cctools-and-ld64-feedstock/blob/master/LICENSE.txt) +Summary: Darwin Mach-O cross linker Current build status ==================== @@ -29,17 +27,45 @@ Current build status - + + + + + + + + + + + + + - + @@ -48,18 +74,6 @@ Current build status - - - - - - - -
VariantStatus
linuxlinux_64_cross_platformosx-64macos_machinex86_64-apple-darwin13.4.0target_platformlinux-64 + + variant + +
linux_64_cross_platformosx-arm64macos_machinearm64-apple-darwin20.0.0target_platformlinux-64 + + variant + +
osx_64_cross_platformosx-64macos_machinex86_64-apple-darwin13.4.0target_platformosx-64 + + variant + +
osx_64_cross_platformosx-arm64macos_machinearm64-apple-darwin20.0.0target_platformosx-64 + + variant + +
osx_arm64_cross_platformosx-64macos_machinex86_64-apple-darwin13.4.0target_platformosx-arm64 - variant + variant
osxosx_arm64_cross_platformosx-arm64macos_machinearm64-apple-darwin20.0.0target_platformosx-arm64 - variant + variant
Windows - Windows disabled -
Linux_ppc64le - ppc64le disabled -
Current release info @@ -68,7 +82,11 @@ Current release info | Name | Downloads | Version | Platforms | | --- | --- | --- | --- | | [![Conda Recipe](https://img.shields.io/badge/recipe-cctools-green.svg)](https://anaconda.org/conda-forge/cctools) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/cctools.svg)](https://anaconda.org/conda-forge/cctools) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/cctools.svg)](https://anaconda.org/conda-forge/cctools) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/cctools.svg)](https://anaconda.org/conda-forge/cctools) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-cctools_osx--64-green.svg)](https://anaconda.org/conda-forge/cctools_osx-64) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/cctools_osx-64.svg)](https://anaconda.org/conda-forge/cctools_osx-64) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/cctools_osx-64.svg)](https://anaconda.org/conda-forge/cctools_osx-64) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/cctools_osx-64.svg)](https://anaconda.org/conda-forge/cctools_osx-64) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-cctools_osx--arm64-green.svg)](https://anaconda.org/conda-forge/cctools_osx-arm64) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/cctools_osx-arm64.svg)](https://anaconda.org/conda-forge/cctools_osx-arm64) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/cctools_osx-arm64.svg)](https://anaconda.org/conda-forge/cctools_osx-arm64) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/cctools_osx-arm64.svg)](https://anaconda.org/conda-forge/cctools_osx-arm64) | | [![Conda Recipe](https://img.shields.io/badge/recipe-ld64-green.svg)](https://anaconda.org/conda-forge/ld64) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/ld64.svg)](https://anaconda.org/conda-forge/ld64) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/ld64.svg)](https://anaconda.org/conda-forge/ld64) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/ld64.svg)](https://anaconda.org/conda-forge/ld64) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-ld64_osx--64-green.svg)](https://anaconda.org/conda-forge/ld64_osx-64) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/ld64_osx-64.svg)](https://anaconda.org/conda-forge/ld64_osx-64) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/ld64_osx-64.svg)](https://anaconda.org/conda-forge/ld64_osx-64) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/ld64_osx-64.svg)](https://anaconda.org/conda-forge/ld64_osx-64) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-ld64_osx--arm64-green.svg)](https://anaconda.org/conda-forge/ld64_osx-arm64) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/ld64_osx-arm64.svg)](https://anaconda.org/conda-forge/ld64_osx-arm64) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/ld64_osx-arm64.svg)](https://anaconda.org/conda-forge/ld64_osx-arm64) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/ld64_osx-arm64.svg)](https://anaconda.org/conda-forge/ld64_osx-arm64) | Installing cctools-and-ld64 =========================== @@ -79,10 +97,10 @@ Installing `cctools-and-ld64` from the `conda-forge` channel can be achieved by conda config --add channels conda-forge ``` -Once the `conda-forge` channel has been enabled, `cctools, ld64` can be installed with: +Once the `conda-forge` channel has been enabled, `cctools, cctools_osx-64, cctools_osx-arm64, ld64, ld64_osx-64, ld64_osx-arm64` can be installed with: ``` -conda install cctools ld64 +conda install cctools cctools_osx-64 cctools_osx-arm64 ld64 ld64_osx-64 ld64_osx-arm64 ``` It is possible to list all of the versions of `cctools` available on your platform with: @@ -157,5 +175,6 @@ Feedstock Maintainers * [@davidbrochart](https://github.com/davidbrochart/) * [@isuruf](https://github.com/isuruf/) +* [@katietz](https://github.com/katietz/) * [@mingwandroid](https://github.com/mingwandroid/) diff --git a/build-locally.py b/build-locally.py index 8f7ecca..3453cfe 100755 --- a/build-locally.py +++ b/build-locally.py @@ -12,6 +12,10 @@ def setup_environment(ns): os.environ["CONFIG"] = ns.config os.environ["UPLOAD_PACKAGES"] = "False" + if ns.debug: + os.environ["BUILD_WITH_CONDA_DEBUG"] = "1" + if ns.output_id: + os.environ["BUILD_OUTPUT_ID"] = ns.output_id def run_docker_build(ns): @@ -51,6 +55,14 @@ def verify_config(ns): def main(args=None): p = ArgumentParser("build-locally") p.add_argument("config", default=None, nargs="?") + p.add_argument( + "--debug", + action="store_true", + help="Setup debug environment using `conda debug`", + ) + p.add_argument( + "--output-id", help="If running debug, specify the output to setup." + ) ns = p.parse_args(args=args) verify_config(ns) diff --git a/conda-forge.yml b/conda-forge.yml index 9283825..3294e74 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -1,2 +1,5 @@ -upload_on_branch: master conda_forge_output_validation: true +build_platform: + osx_arm64: osx_64 +test_on_native_only: true +channel_priority: flexible diff --git a/recipe/build.sh b/recipe/build.sh index 204d603..db01ddb 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -2,13 +2,12 @@ set -x -if [[ $target_platform == osx-64 ]]; then +if [[ $target_platform == osx-* ]]; then export CPU_COUNT=1 else export CC=$(which clang) export CXX=$(which clang++) export TCROOT=$CONDA_BUILD_SYSROOT - ./tools/fix_unistd_issue.sh fi export cctools_cv_tapi_support=yes @@ -31,17 +30,6 @@ popd export CXXFLAGS="$CXXFLAGS -O2 -gdwarf-4" export CFLAGS="$CFLAGS -O2 -gdwarf-4" -if [[ ${MACOSX_DEPLOYMENT_TARGET} == 10.10 ]]; then - DARWIN_TARGET=x86_64-apple-darwin14.5.0 -else - DARWIN_TARGET=x86_64-apple-darwin13.4.0 -fi - -if [[ -z ${DARWIN_TARGET} ]]; then - echo "Need a valid DARWIN_TARGET" - exit 1 -fi - pushd ${SRC_DIR}/cctools ./autogen.sh popd @@ -52,8 +40,9 @@ pushd cctools_build_final --prefix=${PREFIX} \ --host=${HOST} \ --build=${BUILD} \ - --target=${DARWIN_TARGET} \ + --target=${macos_machine} \ --disable-static \ + --with-libtapi=${PREFIX} \ --enable-shared || (cat config.log && cat config.status && false) cat config.log cat config.status diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index 82adbf0..bdfde90 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -1,5 +1,16 @@ macos_machine: - x86_64-apple-darwin13.4.0 + - arm64-apple-darwin20.0.0 +cross_platform: + - osx-64 + - osx-arm64 +uname_machine: + - x86_64 + - arm64 +zip_keys: + - - macos_machine + - cross_platform + - uname_machine cxx_compiler: - clang_bootstrap # [osx] - gxx # [linux] @@ -10,8 +21,6 @@ c_compiler: - vs2017 # [win] vc: - 14 -python: - - 3.7 c_compiler_version: # [osx] - "*" # [osx] cxx_compiler_version: # [osx] diff --git a/recipe/install-cctools-symlinks.sh b/recipe/install-cctools-symlinks.sh index c1ace0d..ea0658b 100644 --- a/recipe/install-cctools-symlinks.sh +++ b/recipe/install-cctools-symlinks.sh @@ -2,6 +2,6 @@ prefix="${macos_machine}-" pushd $PREFIX/bin for tool in $(ls ${prefix}*); do - ln -s $PREFIX/bin/$tool $PREFIX/bin/${tool:${#prefix}} + ln -s $PREFIX/bin/$tool $PREFIX/bin/${tool:${#prefix}} || true done popd diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 3e09aba..c7a3c50 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,7 +1,10 @@ {% set cctools_version = '949.0.1' %} {% set ld64_version = '530' %} -{% set cross_platform = 'osx-64' %} -{% set llvm_version = "10.0.1" %} +{% set llvm_version = "11.0.0" %} + +{% if cross_platform is not defined %} +{% set cross_platform = "osx-64" %} +{% endif %} package: name: cctools-and-ld64 @@ -9,14 +12,14 @@ package: source: # latest commit from branch {{ cctools_version }}-ld64-{{ ld64_version }} - - url: https://github.com/tpoechtrager/cctools-port/archive/4da2f3b485bcf4cef526f30c0b8c0bcda99cdbb4.tar.gz - sha256: a2d491c0981cef72fee2b833598f20f42a6c44a7614a61c439bda93d56446fec + - url: https://github.com/tpoechtrager/cctools-port/archive/634a084377ee2e2932c66459b0396edf76da2e9f.tar.gz + sha256: 2a3f7e32f7f4b1a776a7c58a014ddac57da81a97675a47e5214b05f65177f90b patches: - - dont_link_with_libcxxabi.patch - - 530-ld64-add-conda-specific-env-vars-to-modify-lib-search-paths.patch + - patches/dont_link_with_libcxxabi.patch + - patches/530-ld64-add-conda-specific-env-vars-to-modify-lib-search-paths.patch build: - number: 7 + number: 15 skip: True # [win] ignore_run_exports: - zlib @@ -62,18 +65,21 @@ outputs: run: - libcxx # [osx] - {{ pin_subpackage("ld64_" + cross_platform, max_pin="x.x") }} + - ldid run_constrained: - ld64 {{ ld64_version }}.* - cctools {{ cctools_version }}.* test: commands: + # For arm64, cctools as calls the clang integrated assembler. Don't check for it - test -f $PREFIX/libexec/as/x86_64/as - test -f $PREFIX/bin/{{ macos_machine }}-as - test -f $PREFIX/bin/{{ macos_machine }}-ranlib + - test -f $PREFIX/bin/{{ macos_machine }}-ld - test -f $PREFIX/bin/{{ macos_machine }}-ar - test -f $PREFIX/bin/{{ macos_machine }}-otool # Check that otool is functioning - - $PREFIX/bin/{{ macos_machine }}-otool -l $PREFIX/bin/{{ macos_machine }}-otool + - $PREFIX/bin/{{ macos_machine }}-otool -l $PREFIX/bin/{{ macos_machine }}-otool # [target_platform == build_platform and target_platform == cross_platform] - test -f $PREFIX/bin/{{ macos_machine }}-install_name_tool - test -f $PREFIX/bin/{{ macos_machine }}-strip about: @@ -105,6 +111,7 @@ outputs: run: - {{ pin_compatible("tapi") }} - libcxx # [osx] + - ldid run_constrained: - {{ pin_compatible("clang") }} - ld {{ ld64_version }}.* @@ -119,7 +126,7 @@ outputs: - clang -c lto.c -o lto.o -flto # [osx] - $PREFIX/bin/{{ macos_machine }}-ld lto.o -o lto -lSystem -arch x86_64 # [osx] downstreams: - - gfortran_osx-64 # [osx] + - gfortran_osx-64 # [osx and cross_platform=="osx-64"] about: home: https://github.com/tpoechtrager/cctools-port license: APSL-2.0 @@ -129,6 +136,8 @@ outputs: - name: ld64 version: {{ ld64_version }} + build: + skip: True # [cross_platform != target_platform] script: install-ld64-symlinks.sh requirements: host: @@ -151,6 +160,8 @@ outputs: - name: cctools version: {{ cctools_version }} script: install-cctools-symlinks.sh + build: + skip: True # [cross_platform != target_platform] requirements: host: - {{ pin_subpackage("ld64", exact=True) }} diff --git a/recipe/530-ld64-add-conda-specific-env-vars-to-modify-lib-search-paths.patch b/recipe/patches/530-ld64-add-conda-specific-env-vars-to-modify-lib-search-paths.patch similarity index 100% rename from recipe/530-ld64-add-conda-specific-env-vars-to-modify-lib-search-paths.patch rename to recipe/patches/530-ld64-add-conda-specific-env-vars-to-modify-lib-search-paths.patch diff --git a/recipe/dont_link_with_libcxxabi.patch b/recipe/patches/dont_link_with_libcxxabi.patch similarity index 100% rename from recipe/dont_link_with_libcxxabi.patch rename to recipe/patches/dont_link_with_libcxxabi.patch