From 74a102779da9d1f4083fa361f7abaafd42b6e61b Mon Sep 17 00:00:00 2001 From: joboet Date: Sat, 24 Sep 2022 20:40:51 +0200 Subject: [PATCH 1/2] enable link-time thread local support on MinGW --- compiler/rustc_target/src/spec/windows_gnu_base.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/rustc_target/src/spec/windows_gnu_base.rs b/compiler/rustc_target/src/spec/windows_gnu_base.rs index 81d44a963f1f3..304e305ab070c 100644 --- a/compiler/rustc_target/src/spec/windows_gnu_base.rs +++ b/compiler/rustc_target/src/spec/windows_gnu_base.rs @@ -87,6 +87,7 @@ pub fn opts() -> TargetOptions { emit_debug_gdb_scripts: false, requires_uwtable: true, eh_frame_header: false, + has_thread_local: true, // FIXME(davidtwco): Support Split DWARF on Windows GNU - may require LLVM changes to // output DWO, despite using DWARF, doesn't use ELF.. debuginfo_kind: DebuginfoKind::Pdb, From 618b0546ec6cc5395d4819374110db672aae52f5 Mon Sep 17 00:00:00 2001 From: joboet Date: Sat, 24 Sep 2022 20:42:17 +0200 Subject: [PATCH 2/2] [do not merge] use CI runners for testing --- .github/workflows/ci.yml | 36 ++++++++++++++++++------ src/ci/github-actions/ci.yml | 53 +++++++++++++++++++++++++++++++----- 2 files changed, 73 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6693182e0c578..1f0b236855a4c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,16 +44,34 @@ jobs: strategy: matrix: include: - - name: mingw-check - os: ubuntu-20.04-xl - env: {} - - name: x86_64-gnu-llvm-13 - os: ubuntu-20.04-xl - env: {} - - name: x86_64-gnu-tools + - name: i686-mingw-1 env: - CI_ONLY_WHEN_SUBMODULES_CHANGED: 1 - os: ubuntu-20.04-xl + RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu --set llvm.allow-old-toolchain" + SCRIPT: make ci-mingw-subset-1 + NO_DOWNLOAD_CI_LLVM: 1 + CUSTOM_MINGW: 1 + os: windows-latest-xl + - name: i686-mingw-2 + env: + RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu --set llvm.allow-old-toolchain" + SCRIPT: make ci-mingw-subset-2 + NO_DOWNLOAD_CI_LLVM: 1 + CUSTOM_MINGW: 1 + os: windows-latest-xl + - name: x86_64-mingw-1 + env: + SCRIPT: make ci-mingw-subset-1 + RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-profiler --set llvm.allow-old-toolchain" + NO_DOWNLOAD_CI_LLVM: 1 + CUSTOM_MINGW: 1 + os: windows-latest-xl + - name: x86_64-mingw-2 + env: + SCRIPT: make ci-mingw-subset-2 + RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-profiler --set llvm.allow-old-toolchain" + NO_DOWNLOAD_CI_LLVM: 1 + CUSTOM_MINGW: 1 + os: windows-latest-xl timeout-minutes: 600 runs-on: "${{ matrix.os }}" steps: diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index f020c31079e5e..597aced22e32d 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -286,16 +286,55 @@ jobs: strategy: matrix: include: - - name: mingw-check - <<: *job-linux-xl + - name: i686-mingw-1 + env: + RUST_CONFIGURE_ARGS: >- + --build=i686-pc-windows-gnu + --set llvm.allow-old-toolchain + SCRIPT: make ci-mingw-subset-1 + # We are intentionally allowing an old toolchain on this builder (and that's + # incompatible with LLVM downloads today). + NO_DOWNLOAD_CI_LLVM: 1 + CUSTOM_MINGW: 1 + <<: *job-windows-xl - - name: x86_64-gnu-llvm-13 - <<: *job-linux-xl + - name: i686-mingw-2 + env: + RUST_CONFIGURE_ARGS: >- + --build=i686-pc-windows-gnu + --set llvm.allow-old-toolchain + SCRIPT: make ci-mingw-subset-2 + # We are intentionally allowing an old toolchain on this builder (and that's + # incompatible with LLVM downloads today). + NO_DOWNLOAD_CI_LLVM: 1 + CUSTOM_MINGW: 1 + <<: *job-windows-xl - - name: x86_64-gnu-tools + - name: x86_64-mingw-1 env: - CI_ONLY_WHEN_SUBMODULES_CHANGED: 1 - <<: *job-linux-xl + SCRIPT: make ci-mingw-subset-1 + RUST_CONFIGURE_ARGS: >- + --build=x86_64-pc-windows-gnu + --enable-profiler + --set llvm.allow-old-toolchain + # We are intentionally allowing an old toolchain on this builder (and that's + # incompatible with LLVM downloads today). + NO_DOWNLOAD_CI_LLVM: 1 + CUSTOM_MINGW: 1 + <<: *job-windows-xl + + - name: x86_64-mingw-2 + env: + SCRIPT: make ci-mingw-subset-2 + RUST_CONFIGURE_ARGS: >- + --build=x86_64-pc-windows-gnu + --enable-profiler + --set llvm.allow-old-toolchain + # We are intentionally allowing an old toolchain on this builder (and that's + # incompatible with LLVM downloads today). + NO_DOWNLOAD_CI_LLVM: 1 + CUSTOM_MINGW: 1 + <<: *job-windows-xl auto: permissions: