Skip to content

Commit e112976

Browse files
authored
Merge pull request #296 from maleadt/tb/augment_platform
Use new LLVMExtra jll supporting asserts builds.
2 parents 4e35b62 + 7f5145f commit e112976

File tree

6 files changed

+33
-29
lines changed

6 files changed

+33
-29
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,29 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
version: ['1.6', '^1.7', 'nightly']
15+
version: ['1.6', '1.7', '^1.8.0-beta1', 'nightly']
1616
os: [ubuntu-latest, macOS-latest, windows-latest]
1717
arch: [x64]
18-
libLLVMExtra: [local, packaged]
18+
libLLVMExtra: [packaged]
1919
assertions: [false]
20-
exclude:
21-
# our simple build_local.jl cannot build libLLVMExtra on Windows
22-
- os: windows-latest
23-
arch: x64
24-
libLLVMExtra: local
2520
include:
26-
# specially-handled assertions build
21+
# special test with a locally-built libLLVMExtra
2722
- os: ubuntu-latest
2823
arch: x64
2924
libLLVMExtra: local
25+
version: '1.7'
26+
assertions: true
27+
# special test with LLVM assertions enabled
28+
# TODO: enable this across all versions
29+
# (needs LLVM.jl fixes, and julia-actions/setup-julia support)
30+
- os: ubuntu-latest
31+
arch: x64
32+
libLLVMExtra: packaged
33+
version: '1.7'
34+
assertions: true
35+
- os: ubuntu-latest
36+
arch: x64
37+
libLLVMExtra: packaged
3038
version: '1.8'
3139
assertions: true
3240
steps:

Manifest.toml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,14 @@ uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
3333
version = "1.4.1"
3434

3535
[[LLVMExtra_jll]]
36-
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
37-
git-tree-sha1 = "67cc5406b15bd04ff72a45f628bec61d36078908"
36+
deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"]
37+
git-tree-sha1 = "5558ad3c8972d602451efe9d81c78ec14ef4f5ef"
3838
uuid = "dad2f222-ce93-54a1-a47d-0025e8a3acab"
39-
version = "0.0.13+3"
39+
version = "0.0.14+2"
40+
41+
[[LazyArtifacts]]
42+
deps = ["Artifacts", "Pkg"]
43+
uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
4044

4145
[[LibCURL]]
4246
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
@@ -80,9 +84,9 @@ uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
8084

8185
[[Preferences]]
8286
deps = ["TOML"]
83-
git-tree-sha1 = "2cf929d64681236a2e074ffafb8d568733d2e6af"
87+
git-tree-sha1 = "de893592a221142f3db370f48290e3a2ef39998f"
8488
uuid = "21216c6a-2e73-6563-6e65-726566657250"
85-
version = "1.2.3"
89+
version = "1.2.4"
8690

8791
[[Printf]]
8892
deps = ["Unicode"]

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ Unicode = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
1111

1212
[compat]
1313
CEnum = "0.2, 0.3, 0.4"
14-
LLVMExtra_jll = "=0.0.13"
14+
LLVMExtra_jll = "=0.0.14"
1515
julia = "1.6"

src/LLVM.jl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,6 @@ if libllvm === nothing
1818
If you are, please file an issue and attach the output of `Libdl.dllist()`.""")
1919
end
2020

21-
# our JLL doesn't support LLVM with assertions yet, so loading LLVMExtra might fail.
22-
Libdl.dlopen(libllvm) do handle
23-
if Libdl.dlsym(handle, "_ZN4llvm23EnableABIBreakingChecksE"; throw_error=false) !== nothing
24-
@warn """You are using a version of Julia that links against a build of LLVM with assertions enabled.
25-
26-
This is not supported out-of-the-box, and you need a build of libLLVMExtra that supports this.
27-
Use `deps/build_local.jl` for that, add the resulting LocalPreferences.toml to your project
28-
and add a direct dependency on LLVMExtra_jll to pick up those preferences."""
29-
end
30-
end
31-
3221
module API
3322
using CEnum
3423
using ..LLVM

src/version.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ function runtime_version()
1818
VersionNumber(m[:version])
1919
end
2020
end
21+
22+
function is_asserts()
23+
Libdl.dlopen(libllvm) do handle
24+
Libdl.dlsym(handle, "_ZN4llvm23EnableABIBreakingChecksE"; throw_error=false) !== nothing
25+
end
26+
end

test/runtests.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
using LLVM
2-
using LLVMExtra_jll
32
using Test
43

54
if Base.JLOptions().debug_level < 2
65
@warn "It is recommended to run the LLVM.jl test suite with -g2"
76
end
87

9-
@info "Using libLLVMExtra from $(LLVM.API.libLLVMExtra)"
10-
118
@testset "LLVM" begin
129

1310
# HACK: if a test throws within a Context() do block, displaying the LLVM value may crash
@@ -71,7 +68,7 @@ include("utils.jl")
7168
if LLVM.has_orc_v1()
7269
include("orc.jl")
7370
end
74-
if LLVM.has_orc_v2()
71+
if LLVM.has_orc_v2() && !(LLVM.version() < v"13" && LLVM.is_asserts())
7572
include("orcv2.jl")
7673
end
7774

0 commit comments

Comments
 (0)