Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement per-platform compiler version selection #1360

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

imciner2
Copy link
Member

@imciner2 imciner2 commented Jan 3, 2025

This implements the ability to select a different compiler version for each requested platform. This can be useful when certain platforms might need a newer version of GCC to fix bugs in the toolchain (e.g., riscv), but we don't want to increase the version for working platforms.

An example use of this is:

platforms = supported_platforms()
platforms = expand_cxxstring_abis(platforms)

# Use GCC 13.2 on RISC-V to fix linking issues with atomic operations, but GCC 6 everywhere else
compiler_versions = preferred_platform_compiler(platforms, v"6")
set_preferred_compiler_version!(compiler_versions, v"13.2", p -> arch(p) == "riscv64")

build_tarballs(
    ARGS,
    name,
    version,
    sources,
    script,
    platforms,
    products,
    dependencies;
    preferred_gcc_version = compiler_versions,
    julia_compat = "1.6",
)

This will then use GCC 13 on the RISCV platforms, and GCC 6 on all other platforms.

test/compilers.jl Outdated Show resolved Hide resolved
test/building.jl Outdated Show resolved Hide resolved
test/building.jl Outdated Show resolved Hide resolved
test/building.jl Outdated Show resolved Hide resolved
test/building.jl Outdated Show resolved Hide resolved
@imciner2 imciner2 marked this pull request as ready for review January 5, 2025 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants