diff --git a/.github/workflows/cling-wheels.yml b/.github/workflows/cling-wheels.yml index d741ad60..cee13562 100644 --- a/.github/workflows/cling-wheels.yml +++ b/.github/workflows/cling-wheels.yml @@ -27,10 +27,8 @@ jobs: env: CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }} CIBW_ARCHS: "${{ matrix.cibw.arch || 'auto' }}" - CLING_CMAKE_BUILD_TARGET: "${{ matrix.cibw.arch || '' }}" CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }} CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }} - CIBW_BUILD_VERBOSITY: 1 strategy: fail-fast: false @@ -41,13 +39,14 @@ jobs: python: 310 platform_id: macosx_x86_64 - # cross-compilation platform - - os: macos-latest - name: mac-cpython-arm - python: 310 - platform_id: macosx_arm64 - cibw: - arch: arm64 + # cross-compilation platform, disabled because tools build + # during the build process won't run + #- os: macos-latest + # name: mac-cpython-arm + # python: 310 + # platform_id: macosx_arm64 + # cibw: + # arch: arm64 - os: ubuntu-latest name: manylinux2014-x86_64 @@ -71,13 +70,15 @@ jobs: python: 310 platform_id: win_amd64 - # cross-compilation platform - - os: windows-latest - name: win32-arm64 - python: 310 - platform_id: win_arm64 - cibw: - arch: ARM64 + # cross-compilation platform (requires cross-compilation setup + # for cmake configuration), disabled because tools build during + # the build process won't run + #- os: windows-latest + # name: win32-arm64 + # python: 310 + # platform_id: win_arm64 + # cibw: + # arch: ARM64 steps: - uses: actions/checkout@v3 diff --git a/circleci.py b/circleci.py index 88111563..47733aa8 100644 --- a/circleci.py +++ b/circleci.py @@ -7,6 +7,8 @@ import time import json +import sys + def get_artifact( token: str, @@ -45,7 +47,7 @@ def start_job( org: str = "wlav", project: str = "cppyy-backend", build_aarch64_wheel: bool = True, - branch: str = "build-wheels-with-cibuildwheel", + branch: str = "master", **kwargs, ) -> int: import http.client @@ -69,7 +71,6 @@ def start_job( headers, ) res = conn.getresponse() - print("pipeline data:", res.read().decode("utf-8")) pipeline_data = json.loads(res.read().decode("utf-8")) time.sleep(1.0) @@ -104,12 +105,8 @@ def start_job( ) res = conn.getresponse() - print("job data:\n", res.read().decode("utf-8")) job_data = json.loads(res.read().decode("utf-8")) - print(job_data) - - print(job_data["items"][0]["job_number"]) return 0 diff --git a/cling/patches/apple.diff b/cling/patches/apple.diff index 342571f6..415fd77e 100644 --- a/cling/patches/apple.diff +++ b/cling/patches/apple.diff @@ -2,7 +2,7 @@ diff --git a/src/interpreter/cling/lib/Interpreter/CIFactory.cpp b/src/interpret index aec153242b..abcfd33597 100644 --- a/src/interpreter/cling/lib/Interpreter/CIFactory.cpp +++ b/src/interpreter/cling/lib/Interpreter/CIFactory.cpp -@@ -336,6 +336,13 @@ namespace { +@@ -305,6 +305,13 @@ namespace { } #endif // _LIBCPP_VERSION diff --git a/cling/patches/cling_update.diff b/cling/patches/cling_update.diff index a55e19fa..b469e67b 100644 --- a/cling/patches/cling_update.diff +++ b/cling/patches/cling_update.diff @@ -912,7 +912,11 @@ index 5342945ed1..04bebf0558 100644 switch (CI.getCodeGenOpts().OptimizationLevel) { case 0: OptLevel = CodeGenOpt::None; break; case 1: OptLevel = CodeGenOpt::Less; break; -@@ -334,19 +448,35 @@ Error RTDynamicLibrarySearchGenerator::tryToGenerate( +@@ -330,23 +448,39 @@ Error RTDynamicLibrarySearchGenerator::tryToGenerate( + case 3: OptLevel = CodeGenOpt::Aggressive; break; + default: OptLevel = CodeGenOpt::Default; + } + + + const Triple &TT = CI.getTarget().getTriple(); + diff --git a/cling/patches/pch.diff b/cling/patches/pch.diff index a0a110c4..7defcd1e 100644 --- a/cling/patches/pch.diff +++ b/cling/patches/pch.diff @@ -11,7 +11,7 @@ index 80d1b1c52a..58edb8c26d 100644 using namespace clang; using namespace cling; -@@ -345,7 +347,37 @@ namespace { +@@ -345,7 +347,63 @@ namespace { } #ifdef CLING_OSX_SYSROOT @@ -40,11 +40,37 @@ index 80d1b1c52a..58edb8c26d 100644 + sysroot = sysroot.substr(0, pos+11) + getenv("MACOSX_DEPLOYMENT_TARGET") + ".sdk"; + else + sysroot = sysroot.substr(0, pos+11)+".sdk"; // generic location -+ if (stat(sysroot.c_str(), &buf) == 0) -+ sArguments.addArgument("-isysroot", sysroot.c_str()); -+ else -+ cling::errs() << "Warning: sysroot \"" << sysroot << "\" not found (ignoring for now)."; + } ++ if (stat(sysroot.c_str(), &buf) != 0) { ++ // final attempt, query xcrun ++ std::string SdkPathQuery("xcrun --show-sdk-path"); ++ if (Verbose) ++ cling::log() << "Looking for sysroot:\n " << SdkPathQuery << "\n"; ++ ++ if (FILE *PF = ::popen(SdkPathQuery.c_str(), "r")) { ++ llvm::SmallVector Buf; ++ Buf.resize(Buf.capacity_in_bytes()); ++ while (fgets(&Buf[0], Buf.capacity_in_bytes(), PF) && Buf[0]) { ++ llvm::StringRef Path(&Buf[0]); ++ Path = Path.trim(); ++ if (!Path.empty()) { ++ if (!llvm::sys::fs::is_directory(Path)) { ++ if (Verbose) ++ cling::utils::LogNonExistantDirectory(Path); ++ } ++ else { ++ sysroot = Path.str(); ++ break; ++ } ++ } ++ ::pclose(PF); ++ } ++ } ++ } ++ if (stat(sysroot.c_str(), &buf) == 0) ++ sArguments.addArgument("-isysroot", sysroot.c_str()); ++ else ++ cling::errs() << "Warning: sysroot \"" << sysroot << "\" not found (ignoring for now)."; + } + } #endif diff --git a/cling/python/cppyy_backend/_version.py b/cling/python/cppyy_backend/_version.py index 12486b38..e5ab9ec3 100644 --- a/cling/python/cppyy_backend/_version.py +++ b/cling/python/cppyy_backend/_version.py @@ -1 +1 @@ -__version__ = '6.28.0' +__version__ = '6.28.6' diff --git a/cling/setup.py b/cling/setup.py index 30c5f170..c89777f1 100755 --- a/cling/setup.py +++ b/cling/setup.py @@ -150,6 +150,9 @@ def run(self): CMAKE_COMMAND = ['cmake', srcdir, '-Wno-dev', stdcxx, '-DLLVM_ENABLE_TERMINFO=0', '-DLLVM_ENABLE_ASSERTIONS=0', '-Dminimal=ON', '-Dbuiltin_cling=ON', '-Druntime_cxxmodules=OFF', '-Dbuiltin_zlib=ON'] + if 'CIBW_MANYLINUX_X86_64_IMAGE' in os.environ or 'CIBW_MANYLINUX_I686_IMAGE' in os.environ: + print("enabling _GLIBCXX_USE_CXX11_ABI") + CMAKE_COMMAND.append('-DCMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=1') if 'darwin' in sys.platform: CMAKE_COMMAND.append('-Dlibcxx=ON') CMAKE_COMMAND.append('-DCMAKE_BUILD_TYPE='+get_build_type()) @@ -162,7 +165,7 @@ def run(self): CMAKE_COMMAND += ['-Thost=x86', '-DCMAKE_GENERATOR_PLATFORM=win32'] elif 'darwin' in sys.platform: import platform - if 'arm64' in platform.machine() or 'arm64' in os.getenv("CLING_CMAKE_BUILD_TARGET"): + if 'arm64' in platform.machine(): CMAKE_COMMAND += ['-DLLVM_TARGETS_TO_BUILD=ARM;AArch64;NVPTX'] CMAKE_COMMAND.append('-DCMAKE_INSTALL_PREFIX='+prefix)