Skip to content

Commit

Permalink
Remove almost all outdated platform specifications (#1921)
Browse files Browse the repository at this point in the history
The only exception is for package using a custom compiler_abi, which in turn
is mostly (only?) JLLs which use libcxxwrap-julia and copy its restrictions.
But hopefully libcxxwrap-julia can soon use libjulia and support far more
platforms, including all C++ ABI variants.

This commit was created with the following script:

    git ls-files :*.jl :*.md | xargs perl -pi -e 's/(Linux|FreeBSD|MacOS|Windows)\(:([^,;)]+)\)/Platform("\2", "\L\1")/g'
    git ls-files :*.jl :*.md | xargs perl -pi -e 's/(Linux|FreeBSD|MacOS|Windows)\(:([^,;)]+)[,;] libc=:([^,;)]+)(, call_abi=:eabihf)?\)/Platform("\2", "\L\1"; libc="\3")/g'
    git ls-files :*.jl :*.md | xargs perl -pi -e 's/MacOS\(\)/Platform("x86_64", "macos")/g'

[skip ci]
  • Loading branch information
fingolfin authored Oct 19, 2020
1 parent ab81814 commit d81438d
Show file tree
Hide file tree
Showing 95 changed files with 469 additions and 469 deletions.
2 changes: 1 addition & 1 deletion 0_RootFS/Go/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mv ${WORKSPACE}/srcdir/go ${prefix}/
# We only build for Linux x86_64
platforms = [
# TODO: Switch to musl once https://github.com/rust-lang/rustup.rs/pull/1882 is released
Linux(:x86_64; libc=:musl),
Platform("x86_64", "linux"; libc="musl"),
]

# Dependencies that must be installed before this package can be built
Expand Down
4 changes: 2 additions & 2 deletions 0_RootFS/Rust/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ${CARGO_HOME}/bin/cargo install cargo-edit
"""

# We assemble this giant tarball, then will split it up immediately after this:
platforms = [Linux(:x86_64; libc=:glibc)]
platforms = [Platform("x86_64", "linux"; libc="glibc")]
products = [
ExecutableProduct("cargo", :cargo),
]
Expand All @@ -65,7 +65,7 @@ rm(joinpath("products", first(values(build_info))[1]))

# Take the hash of the unpacked MegaRust artifact, then split it into a bunch of smaller ones
mega_rust_path = artifact_path(first(values(build_info))[3])
rust_host = Linux(:x86_64; libc=:glibc)
rust_host = Platform("x86_64", "linux"; libc="glibc")
rust_host_triplet = BinaryBuilder.map_rust_target(rust_host)

for target_platform in supported_platforms()
Expand Down
18 changes: 9 additions & 9 deletions A/AccerionSensorAPI/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ make install
# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [
Linux(:i686, libc=:glibc),
Linux(:x86_64, libc=:glibc),
Linux(:aarch64, libc=:glibc),
Linux(:armv7l, libc=:glibc, call_abi=:eabihf),
Linux(:powerpc64le, libc=:glibc),
Linux(:i686, libc=:musl),
Linux(:x86_64, libc=:musl),
Linux(:aarch64, libc=:musl),
Linux(:armv7l, libc=:musl, call_abi=:eabihf)
Platform("i686", "linux"; libc="glibc"),
Platform("x86_64", "linux"; libc="glibc"),
Platform("aarch64", "linux"; libc="glibc"),
Platform("armv7l", "linux"; libc="glibc"),
Platform("powerpc64le", "linux"; libc="glibc"),
Platform("i686", "linux"; libc="musl"),
Platform("x86_64", "linux"; libc="musl"),
Platform("aarch64", "linux"; libc="musl"),
Platform("armv7l", "linux"; libc="musl")
]
platforms = expand_cxxstring_abis(platforms)

Expand Down
20 changes: 10 additions & 10 deletions A/aiger/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ PREFIX=$prefix make install
# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [
Linux(:i686, libc=:glibc),
Linux(:x86_64, libc=:glibc),
Linux(:aarch64, libc=:glibc),
Linux(:armv7l, libc=:glibc, call_abi=:eabihf),
Linux(:powerpc64le, libc=:glibc),
Linux(:i686, libc=:musl),
Linux(:x86_64, libc=:musl),
Linux(:aarch64, libc=:musl),
Linux(:armv7l, libc=:musl, call_abi=:eabihf),
FreeBSD(:x86_64)
Platform("i686", "linux"; libc="glibc"),
Platform("x86_64", "linux"; libc="glibc"),
Platform("aarch64", "linux"; libc="glibc"),
Platform("armv7l", "linux"; libc="glibc"),
Platform("powerpc64le", "linux"; libc="glibc"),
Platform("i686", "linux"; libc="musl"),
Platform("x86_64", "linux"; libc="musl"),
Platform("aarch64", "linux"; libc="musl"),
Platform("armv7l", "linux"; libc="musl"),
Platform("x86_64", "freebsd")
]


Expand Down
4 changes: 2 additions & 2 deletions A/assimp/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ make install

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [p for p in supported_platforms() if p != Linux(:i686, libc=:musl) &&
p != Linux(:armv7l, libc=:musl, call_abi=:eabihf)
platforms = [p for p in supported_platforms() if p != Platform("i686", "linux"; libc="musl") &&
p != Platform("armv7l", "linux"; libc="musl")
]
platforms = expand_cxxstring_abis(platforms)

Expand Down
2 changes: 1 addition & 1 deletion B/Binutils/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ done

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [Linux(:x86_64)]
platforms = [Platform("x86_64", "linux")]

# The products that we will ensure are always built
products = prefix -> [
Expand Down
14 changes: 7 additions & 7 deletions B/blis/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ fi
# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [
Linux(:x86_64, libc=:musl),
Linux(:armv7l, libc=:glibc, call_abi=:eabihf),
Windows(:x86_64),
MacOS(:x86_64),
Linux(:x86_64, libc=:glibc),
Linux(:aarch64, libc=:glibc),
FreeBSD(:x86_64)
Platform("x86_64", "linux"; libc="musl"),
Platform("armv7l", "linux"; libc="glibc"),
Platform("x86_64", "windows"),
Platform("x86_64", "macos"),
Platform("x86_64", "linux"; libc="glibc"),
Platform("aarch64", "linux"; libc="glibc"),
Platform("x86_64", "freebsd")
]


Expand Down
20 changes: 10 additions & 10 deletions B/bmon/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ install_license LICENSE.*
# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [
Linux(:i686, libc=:glibc),
Linux(:x86_64, libc=:glibc),
Linux(:aarch64, libc=:glibc),
Linux(:armv7l, libc=:glibc, call_abi=:eabihf),
Linux(:powerpc64le, libc=:glibc),
Linux(:i686, libc=:musl),
Linux(:x86_64, libc=:musl),
Linux(:aarch64, libc=:musl),
Linux(:armv7l, libc=:musl, call_abi=:eabihf),
MacOS(:x86_64)
Platform("i686", "linux"; libc="glibc"),
Platform("x86_64", "linux"; libc="glibc"),
Platform("aarch64", "linux"; libc="glibc"),
Platform("armv7l", "linux"; libc="glibc"),
Platform("powerpc64le", "linux"; libc="glibc"),
Platform("i686", "linux"; libc="musl"),
Platform("x86_64", "linux"; libc="musl"),
Platform("aarch64", "linux"; libc="musl"),
Platform("armv7l", "linux"; libc="musl"),
Platform("x86_64", "macos")
]

# The products that we will ensure are always built
Expand Down
2 changes: 1 addition & 1 deletion C/CUDA/[email protected]/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,4 @@ products = [
]

build_tarballs(ARGS, name, version, [], script,
[Linux(:x86_64), MacOS(:x86_64), Windows(:x86_64)], products, dependencies)
[Platform("x86_64", "linux"), Platform("x86_64", "macos"), Platform("x86_64", "windows")], products, dependencies)
2 changes: 1 addition & 1 deletion C/CUDA/[email protected]/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@ products = [
]

build_tarballs(ARGS, name, version, [], script,
[Linux(:x86_64), MacOS(:x86_64), Windows(:x86_64)], products, dependencies)
[Platform("x86_64", "linux"), Platform("x86_64", "macos"), Platform("x86_64", "windows")], products, dependencies)
2 changes: 1 addition & 1 deletion C/CUDA/[email protected]/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@ products = [
]

build_tarballs(ARGS, name, version, [], script,
[Linux(:x86_64), Windows(:x86_64)], products, dependencies)
[Platform("x86_64", "linux"), Platform("x86_64", "windows")], products, dependencies)
2 changes: 1 addition & 1 deletion C/CUDA/[email protected]/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ products = [
]

build_tarballs(ARGS, name, version, [], script,
[Linux(:x86_64), Linux(:powerpc64le), Windows(:x86_64)],
[Platform("x86_64", "linux"), Platform("powerpc64le", "linux"), Platform("x86_64", "windows")],
products, dependencies)
2 changes: 1 addition & 1 deletion C/CUDA/[email protected]/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ products = [
]

build_tarballs(ARGS, name, version, [], script,
[Linux(:x86_64), Linux(:powerpc64le), Windows(:x86_64)],
[Platform("x86_64", "linux"), Platform("powerpc64le", "linux"), Platform("x86_64", "windows")],
products, dependencies)
2 changes: 1 addition & 1 deletion C/CUDA/[email protected]/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,4 @@ products = [
]

build_tarballs(ARGS, name, version, [], script,
[Linux(:x86_64), MacOS(:x86_64), Windows(:x86_64)], products, dependencies)
[Platform("x86_64", "linux"), Platform("x86_64", "macos"), Platform("x86_64", "windows")], products, dependencies)
2 changes: 1 addition & 1 deletion C/CUDA/[email protected]/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,4 @@ products = [
]

build_tarballs(ARGS, name, version, [], script,
[Linux(:x86_64), MacOS(:x86_64), Windows(:x86_64)], products, dependencies)
[Platform("x86_64", "linux"), Platform("x86_64", "macos"), Platform("x86_64", "windows")], products, dependencies)
6 changes: 3 additions & 3 deletions C/CUDA/[email protected]/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,18 @@ non_reg_ARGS = filter(arg -> arg != "--register", ARGS)

if should_build_platform("x86_64-linux-gnu")
build_tarballs(non_reg_ARGS, name, version, sources_linux, script,
[Linux(:x86_64)], products, dependencies;
[Platform("x86_64", "linux")], products, dependencies;
skip_audit=true)
end

if should_build_platform("x86_64-apple-darwin14")
build_tarballs(non_reg_ARGS, name, version, sources_macos, script,
[MacOS(:x86_64)], products, dependencies;
[Platform("x86_64", "macos")], products, dependencies;
skip_audit=true)
end

if should_build_platform("x86_64-w64-mingw32")
build_tarballs(ARGS, name, version, sources_windows, script,
[Windows(:x86_64)], products, dependencies;
[Platform("x86_64", "windows")], products, dependencies;
skip_audit=true)
end
6 changes: 3 additions & 3 deletions C/CUDA/[email protected]/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,18 @@ non_reg_ARGS = filter(arg -> arg != "--register", ARGS)

if should_build_platform("x86_64-linux-gnu")
build_tarballs(non_reg_ARGS, name, version, sources_linux, script,
[Linux(:x86_64)], products, dependencies;
[Platform("x86_64", "linux")], products, dependencies;
skip_audit=true)
end

if should_build_platform("x86_64-apple-darwin14")
build_tarballs(non_reg_ARGS, name, version, sources_macos, script,
[MacOS(:x86_64)], products, dependencies;
[Platform("x86_64", "macos")], products, dependencies;
skip_audit=true)
end

if should_build_platform("x86_64-w64-mingw32")
build_tarballs(ARGS, name, version, sources_windows, script,
[Windows(:x86_64)], products, dependencies;
[Platform("x86_64", "windows")], products, dependencies;
skip_audit=true)
end
6 changes: 3 additions & 3 deletions C/CUDA/[email protected]/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,18 @@ non_reg_ARGS = filter(arg -> arg != "--register", ARGS)

if should_build_platform("x86_64-linux-gnu")
build_tarballs(non_reg_ARGS, name, version, sources_linux, script,
[Linux(:x86_64)], products, dependencies;
[Platform("x86_64", "linux")], products, dependencies;
skip_audit=true)
end

if should_build_platform("x86_64-apple-darwin14")
build_tarballs(non_reg_ARGS, name, version, sources_macos, script,
[MacOS(:x86_64)], products, dependencies;
[Platform("x86_64", "macos")], products, dependencies;
skip_audit=true)
end

if should_build_platform("x86_64-w64-mingw32")
build_tarballs(ARGS, name, version, sources_windows, script,
[Windows(:x86_64)], products, dependencies;
[Platform("x86_64", "windows")], products, dependencies;
skip_audit=true)
end
6 changes: 3 additions & 3 deletions C/CUDA/[email protected]/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,18 @@ non_reg_ARGS = filter(arg -> arg != "--register", ARGS)

if should_build_platform("x86_64-linux-gnu")
build_tarballs(non_reg_ARGS, name, version, sources_linux, script,
[Linux(:x86_64)], products, dependencies;
[Platform("x86_64", "linux")], products, dependencies;
skip_audit=true)
end

if should_build_platform("powerpc64le-linux-gnu")
build_tarballs(non_reg_ARGS, name, version, sources_linux_ppc64le, script,
[Linux(:powerpc64le)], products, dependencies;
[Platform("powerpc64le", "linux")], products, dependencies;
skip_audit=true)
end

if should_build_platform("x86_64-w64-mingw32")
build_tarballs(ARGS, name, version, sources_win10, script,
[Windows(:x86_64)], products, dependencies;
[Platform("x86_64", "windows")], products, dependencies;
skip_audit=true)
end
6 changes: 3 additions & 3 deletions C/CUDA/[email protected]/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,18 @@ non_reg_ARGS = filter(arg -> arg != "--register", ARGS)

if should_build_platform("x86_64-linux-gnu")
build_tarballs(non_reg_ARGS, name, version, sources_linux, script,
[Linux(:x86_64)], products, dependencies;
[Platform("x86_64", "linux")], products, dependencies;
skip_audit=true)
end

if should_build_platform("powerpc64le-linux-gnu")
build_tarballs(non_reg_ARGS, name, version, sources_linux_ppc64le, script,
[Linux(:powerpc64le)], products, dependencies;
[Platform("powerpc64le", "linux")], products, dependencies;
skip_audit=true)
end

if should_build_platform("x86_64-w64-mingw32")
build_tarballs(ARGS, name, version, sources_win10, script,
[Windows(:x86_64)], products, dependencies;
[Platform("x86_64", "windows")], products, dependencies;
skip_audit=true)
end
6 changes: 3 additions & 3 deletions C/CUDA/[email protected]/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,18 @@ non_reg_ARGS = filter(arg -> arg != "--register", ARGS)

if should_build_platform("x86_64-linux-gnu")
build_tarballs(non_reg_ARGS, name, version, sources_linux, script,
[Linux(:x86_64)], products, dependencies;
[Platform("x86_64", "linux")], products, dependencies;
skip_audit=true)
end

if should_build_platform("x86_64-apple-darwin14")
build_tarballs(non_reg_ARGS, name, version, sources_macos, script,
[MacOS(:x86_64)], products, dependencies;
[Platform("x86_64", "macos")], products, dependencies;
skip_audit=true)
end

if should_build_platform("x86_64-w64-mingw32")
build_tarballs(ARGS, name, version, sources_windows, script,
[Windows(:x86_64)], products, dependencies;
[Platform("x86_64", "windows")], products, dependencies;
skip_audit=true)
end
6 changes: 3 additions & 3 deletions C/CUDA/[email protected]/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,18 @@ non_reg_ARGS = filter(arg -> arg != "--register", ARGS)

if should_build_platform("x86_64-linux-gnu")
build_tarballs(non_reg_ARGS, name, version, sources_linux, script,
[Linux(:x86_64)], products, dependencies;
[Platform("x86_64", "linux")], products, dependencies;
skip_audit=true)
end

if should_build_platform("x86_64-apple-darwin14")
build_tarballs(non_reg_ARGS, name, version, sources_macos, script,
[MacOS(:x86_64)], products, dependencies;
[Platform("x86_64", "macos")], products, dependencies;
skip_audit=true)
end

if should_build_platform("x86_64-w64-mingw32")
build_tarballs(ARGS, name, version, sources_windows, script,
[Windows(:x86_64)], products, dependencies;
[Platform("x86_64", "windows")], products, dependencies;
skip_audit=true)
end
6 changes: 3 additions & 3 deletions C/CUDNN/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ non_reg_ARGS = filter(arg -> arg != "--register", ARGS)

if @isdefined(sources_linux_x64) && should_build_platform("x86_64-linux-gnu")
build_tarballs(non_reg_ARGS, name, version, sources_linux_x64, script,
[Linux(:x86_64)], products, dependencies)
[Platform("x86_64", "linux")], products, dependencies)
end

if @isdefined(sources_linux_ppc64le) && should_build_platform("powerpc64le-linux-gnu")
build_tarballs(non_reg_ARGS, name, version, sources_linux_ppc64le, script,
[Linux(:powerpc64le)], products, dependencies)
[Platform("powerpc64le", "linux")], products, dependencies)
end

if @isdefined(sources_windows) && should_build_platform("x86_64-w64-mingw32")
build_tarballs(ARGS, name, version, sources_windows, script,
[Windows(:x86_64)], products, dependencies)
[Platform("x86_64", "windows")], products, dependencies)
end
6 changes: 3 additions & 3 deletions C/CUTENSOR/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ non_reg_ARGS = filter(arg -> arg != "--register", ARGS)

if @isdefined(sources_linux_x64) && should_build_platform("x86_64-linux-gnu")
build_tarballs(non_reg_ARGS, name, version, sources_linux_x64, script,
[Linux(:x86_64)], products, dependencies)
[Platform("x86_64", "linux")], products, dependencies)
end

if @isdefined(sources_linux_ppc64le) && should_build_platform("powerpc64le-linux-gnu")
build_tarballs(non_reg_ARGS, name, version, sources_linux_ppc64le, script,
[Linux(:powerpc64le)], products, dependencies)
[Platform("powerpc64le", "linux")], products, dependencies)
end

if @isdefined(sources_windows) && should_build_platform("x86_64-w64-mingw32")
build_tarballs(ARGS, name, version, sources_windows, script,
[Windows(:x86_64)], products, dependencies)
[Platform("x86_64", "windows")], products, dependencies)
end
2 changes: 1 addition & 1 deletion C/ConnectFourSolver/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ install_license ${WORKSPACE}/srcdir/connect4/LICENSE
# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [
Linux(:x86_64, libc=:glibc),
Platform("x86_64", "linux"; libc="glibc"),
]

platforms = expand_cxxstring_abis(platforms)
Expand Down
Loading

0 comments on commit d81438d

Please sign in to comment.