Skip to content

Commit 5701869

Browse files
Rollup merge of rust-lang#153079 - RalfJung:revert-macos-dyn, r=jieyouxu
Revert "Enable autodiff in ci for all major os" Reverts rust-lang#152768 which fixes rust-lang#153077.
2 parents 58745ca + 650501e commit 5701869

4 files changed

Lines changed: 8 additions & 18 deletions

File tree

src/bootstrap/src/core/build_steps/llvm.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use crate::core::config::{Config, TargetSelection};
2323
use crate::utils::build_stamp::{BuildStamp, generate_smart_stamp_hash};
2424
use crate::utils::exec::command;
2525
use crate::utils::helpers::{
26-
self, exe, get_clang_cl_resource_dir, libdir, t, unhashed_basename, up_to_date,
26+
self, exe, get_clang_cl_resource_dir, t, unhashed_basename, up_to_date,
2727
};
2828
use crate::{CLang, GitRepo, Kind, trace};
2929

@@ -561,6 +561,7 @@ impl Step for Llvm {
561561
}
562562
};
563563

564+
// FIXME(ZuseZ4): Do we need that for Enzyme too?
564565
// When building LLVM with LLVM_LINK_LLVM_DYLIB for macOS, an unversioned
565566
// libLLVM.dylib will be built. However, llvm-config will still look
566567
// for a versioned path like libLLVM-14.dylib. Manually create a symbolic
@@ -1166,7 +1167,7 @@ impl Step for Enzyme {
11661167
let llvm_version_major = llvm::get_llvm_version_major(builder, &host_llvm_config);
11671168
let lib_ext = std::env::consts::DLL_EXTENSION;
11681169
let libenzyme = format!("libEnzyme-{llvm_version_major}");
1169-
let build_dir = out_dir.join(libdir(target));
1170+
let build_dir = out_dir.join("lib");
11701171
let dylib = build_dir.join(&libenzyme).with_extension(lib_ext);
11711172

11721173
trace!("checking build stamp to see if we need to rebuild enzyme artifacts");
@@ -1204,16 +1205,7 @@ impl Step for Enzyme {
12041205
// hard to spot more relevant issues.
12051206
let mut cflags = CcFlags::default();
12061207
cflags.push_all("-Wno-deprecated");
1207-
1208-
// Logic copied from `configure_llvm`
1209-
// ThinLTO is only available when building with LLVM, enabling LLD is required.
1210-
// Apple's linker ld64 supports ThinLTO out of the box though, so don't use LLD on Darwin.
1211-
let mut ldflags = LdFlags::default();
1212-
if builder.config.llvm_thin_lto && !target.contains("apple") {
1213-
ldflags.push_all("-fuse-ld=lld");
1214-
}
1215-
1216-
configure_cmake(builder, target, &mut cfg, true, ldflags, cflags, &[]);
1208+
configure_cmake(builder, target, &mut cfg, true, LdFlags::default(), cflags, &[]);
12171209

12181210
// Re-use the same flags as llvm to control the level of debug information
12191211
// generated by Enzyme.

src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ ENV RUST_CONFIGURE_ARGS \
9797

9898
ENV SCRIPT python3 ../x.py build --set rust.debug=true opt-dist && \
9999
./build/$HOSTS/stage1-tools-bin/opt-dist linux-ci -- python3 ../x.py dist \
100-
--host $HOSTS --target $HOSTS --include-default-paths build-manifest bootstrap enzyme
100+
--host $HOSTS --target $HOSTS --include-default-paths build-manifest bootstrap
101101

102102
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=clang
103103
ENV LIBCURL_NO_PKG_CONFIG 1

src/ci/docker/host-x86_64/dist-x86_64-linux/dist.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ python3 ../x.py build --set rust.debug=true opt-dist
99
--include-default-paths \
1010
build-manifest \
1111
bootstrap \
12-
enzyme \
1312
rustc_codegen_gcc
1413

1514
# Use GCC for building GCC components, as it seems to behave badly when built with Clang

src/ci/github-actions/jobs.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ auto:
504504
- name: dist-aarch64-apple
505505
env:
506506
SCRIPT: >-
507-
./x.py dist bootstrap enzyme
507+
./x.py dist bootstrap
508508
--include-default-paths
509509
--host=aarch64-apple-darwin
510510
--target=aarch64-apple-darwin
@@ -513,7 +513,6 @@ auto:
513513
--enable-sanitizers
514514
--enable-profiler
515515
--set rust.jemalloc
516-
--set llvm.link-shared=true
517516
--set rust.lto=thin
518517
--set rust.codegen-units=1
519518
# Aarch64 tooling only needs to support macOS 11.0 and up as nothing else
@@ -707,7 +706,7 @@ auto:
707706
# i686 has no dedicated job, build it here because this job is fast
708707
- name: dist-aarch64-llvm-mingw
709708
env:
710-
SCRIPT: python x.py dist bootstrap enzyme --include-default-paths
709+
SCRIPT: python x.py dist bootstrap --include-default-paths
711710
RUST_CONFIGURE_ARGS: >-
712711
--build=aarch64-pc-windows-gnullvm
713712
--target=aarch64-pc-windows-gnullvm,i686-pc-windows-gnullvm
@@ -721,7 +720,7 @@ auto:
721720

722721
- name: dist-x86_64-llvm-mingw
723722
env:
724-
SCRIPT: python x.py dist bootstrap enzyme --include-default-paths
723+
SCRIPT: python x.py dist bootstrap --include-default-paths
725724
RUST_CONFIGURE_ARGS: >-
726725
--build=x86_64-pc-windows-gnullvm
727726
--enable-full-tools

0 commit comments

Comments
 (0)