Skip to content

Commit 06a1674

Browse files
authored
Fix forward erasure (rust-lang#653)
1 parent 58d27d5 commit 06a1674

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/enzyme-julia.yml

+7
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,17 @@ jobs:
3939
with:
4040
version: ${{ matrix.version }}
4141
arch: ${{ matrix.arch }}
42+
4243
- name: Build libEnzyme
44+
if: ${{ matrix.os != 'macOS-latest'}}
4345
run: |
4446
julia --project=jl/deps -e 'using Pkg; Pkg.instantiate()'
4547
julia --project=jl/deps jl/deps/build_local.jl ./enzyme
48+
- name: Build libEnzyme MacOS
49+
if: ${{ matrix.os == 'macOS-latest'}}
50+
run: |
51+
julia --project=jl/deps -e 'using Pkg; Pkg.instantiate()'
52+
SDKROOT=`xcrun --show-sdk-path` julia --project=jl/deps jl/deps/build_local.jl ./enzyme
4653
- uses: julia-actions/julia-buildpkg@v1
4754
with:
4855
project: jl

enzyme/Enzyme/AdjointGenerator.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -8275,8 +8275,7 @@ class AdjointGenerator
82758275
assert(normalReturn->getType() == newCall->getType());
82768276
gutils->replaceAWithB(newCall, normalReturn);
82778277
gutils->erase(newCall);
8278-
} else
8279-
eraseIfUnused(*orig);
8278+
}
82808279
return;
82818280
}
82828281
}

0 commit comments

Comments
 (0)