diff --git a/build-locally.py b/build-locally.py index d78427b..8ac9b84 100755 --- a/build-locally.py +++ b/build-locally.py @@ -1,8 +1,11 @@ -#!/usr/bin/env python3 +#!/bin/sh +"""exec' "python3" "$0" "$@" #""" # fmt: off # fmt: on # # This file has been generated by conda-smithy in order to build the recipe # locally. # +# The line above this comment is a bash / sh / zsh guard +# to stop people from running it with the wrong interpreter import glob import os import platform diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 0289382..9c82711 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "18.1.8" %} +{% set version = "19.1.0" %} {% set major_ver = version.split('.')[0] %} package: @@ -7,13 +7,13 @@ package: source: url: https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-{{ version.replace(".rc", "-rc") }}.tar.gz - sha256: 09c08693a9afd6236f27a2ebae62cda656eba19021ef3f94d59e931d662d4856 + sha256: 0a08341036ca99a106786f50f9c5cb3fbe458b3b74cab6089fd368d0edb2edfe patches: - patches/0001-no-code-sign.patch - patches/0002-Revert-Declare-_availability_version_check-as-weak_i.patch build: - number: 1 + number: 0 requirements: build: @@ -45,8 +45,8 @@ outputs: host: run: - clang {{ version }} - - clangxx {{ version }} run_constrained: + - clangxx {{ version }} - compiler-rt {{ version }} files: - lib/clang/{{ major_ver }}/lib # [unix] @@ -66,7 +66,6 @@ outputs: host: run: - clang {{ version }} - - clangxx {{ version }} - compiler-rt_{{ target_platform }} {{ version }} files: - lib/clang/{{ major_ver }}/share # [unix] diff --git a/recipe/patches/0001-no-code-sign.patch b/recipe/patches/0001-no-code-sign.patch index 6c27a98..db99729 100644 --- a/recipe/patches/0001-no-code-sign.patch +++ b/recipe/patches/0001-no-code-sign.patch @@ -1,47 +1,50 @@ -From dd35ef6087b81d9d7fc658f1c35557eec1cb733f Mon Sep 17 00:00:00 2001 +From 3f0b22d7746015db51f0fc59068683e6c459d45a Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 22 Apr 2019 02:00:30 -0500 Subject: [PATCH 1/2] no code sign --- - compiler-rt/cmake/Modules/AddCompilerRT.cmake | 28 ------------------- - 1 file changed, 28 deletions(-) + compiler-rt/cmake/Modules/AddCompilerRT.cmake | 31 ------------------- + 1 file changed, 31 deletions(-) diff --git a/compiler-rt/cmake/Modules/AddCompilerRT.cmake b/compiler-rt/cmake/Modules/AddCompilerRT.cmake -index e0400a8ea952..ee51eb5bc514 100644 +index 6962b733733a..9afc70e072ab 100644 --- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake +++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake -@@ -392,34 +392,6 @@ function(add_compiler_rt_runtime name type) +@@ -388,37 +388,6 @@ function(add_compiler_rt_runtime name type) set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "") set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib") endif() - if (APPLE AND NOT CMAKE_LINKER MATCHES ".*lld.*") -- # Ad-hoc sign the dylibs when using Xcode versions older than 12. -- # Xcode 12 shipped with ld64-609. -- # FIXME: Remove whole conditional block once everything uses Xcode 12+. -- set(LD_V_OUTPUT) +- # Apple's linker signs the resulting dylib with an ad-hoc code signature in +- # most situations, except: +- # 1. Versions of ld64 prior to ld64-609 in Xcode 12 predate this behavior. +- # 2. Apple's new linker does not when building with `-darwin-target-variant` +- # to support macOS Catalyst. +- # +- # Explicitly re-signing the dylib works around both of these issues. The +- # signature is marked as `linker-signed` when that is supported so that it +- # behaves as expected when processed by subsequent tooling. +- # +- # Detect whether `codesign` supports `-o linker-signed` by passing it as an +- # argument and looking for `invalid argument "linker-signed"` in its output. +- # FIXME: Remove this once all supported toolchains support `-o linker-signed`. - execute_process( -- COMMAND sh -c "${CMAKE_LINKER} -v 2>&1 | head -1" -- RESULT_VARIABLE HAD_ERROR -- OUTPUT_VARIABLE LD_V_OUTPUT +- COMMAND sh -c "codesign -f -s - -o linker-signed this-does-not-exist 2>&1 | grep -q linker-signed" +- RESULT_VARIABLE CODESIGN_SUPPORTS_LINKER_SIGNED - ) -- if (HAD_ERROR) -- message(FATAL_ERROR "${CMAKE_LINKER} failed with status ${HAD_ERROR}") -- endif() -- set(NEED_EXPLICIT_ADHOC_CODESIGN 1) -- if ("${LD_V_OUTPUT}" MATCHES ".*ld64-([0-9.]+).*") -- string(REGEX REPLACE ".*ld64-([0-9.]+).*" "\\1" HOST_LINK_VERSION ${LD_V_OUTPUT}) -- if (HOST_LINK_VERSION VERSION_GREATER_EQUAL 609) -- set(NEED_EXPLICIT_ADHOC_CODESIGN 0) -- endif() -- endif() -- if (NEED_EXPLICIT_ADHOC_CODESIGN) -- add_custom_command(TARGET ${libname} -- POST_BUILD -- COMMAND codesign --sign - $ -- WORKING_DIRECTORY ${COMPILER_RT_OUTPUT_LIBRARY_DIR} -- ) +- +- set(EXTRA_CODESIGN_ARGUMENTS) +- if (CODESIGN_SUPPORTS_LINKER_SIGNED) +- list(APPEND EXTRA_CODESIGN_ARGUMENTS -o linker-signed) - endif() +- +- add_custom_command(TARGET ${libname} +- POST_BUILD +- COMMAND codesign --sign - ${EXTRA_CODESIGN_ARGUMENTS} $ +- WORKING_DIRECTORY ${COMPILER_RT_OUTPUT_LIBRARY_DIR} +- COMMAND_EXPAND_LISTS +- ) - endif() endif() diff --git a/recipe/patches/0002-Revert-Declare-_availability_version_check-as-weak_i.patch b/recipe/patches/0002-Revert-Declare-_availability_version_check-as-weak_i.patch index 045aad2..c338a2f 100644 --- a/recipe/patches/0002-Revert-Declare-_availability_version_check-as-weak_i.patch +++ b/recipe/patches/0002-Revert-Declare-_availability_version_check-as-weak_i.patch @@ -1,4 +1,4 @@ -From d37bc1428cd192a6fa3a967a509805b95a761910 Mon Sep 17 00:00:00 2001 +From 3752b27ad235cd1126f72929d982bbecb27985ad Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Mon, 2 Sep 2024 14:30:13 +1100 Subject: [PATCH 2/2] Revert "Declare _availability_version_check as @@ -10,7 +10,7 @@ This reverts commit b653a2823fe4b4c9c6d85cfe119f31d8e70c2fa0. 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/compiler-rt/lib/builtins/os_version_check.c b/compiler-rt/lib/builtins/os_version_check.c -index 182eabe7a6ae..ebfb2dfc72dd 100644 +index 01fae834ab21..5febb79c0749 100644 --- a/compiler-rt/lib/builtins/os_version_check.c +++ b/compiler-rt/lib/builtins/os_version_check.c @@ -86,10 +86,6 @@ typedef Boolean (*CFStringGetCStringFuncTy)(CFStringRef, char *, CFIndex,