Merge branch 'GP-5547_ryanmkurtz_gradle-clang' (Closes #7958)

This commit is contained in:
Ryan Kurtz 2025-03-31 13:47:49 -04:00
commit 7ab4989d4b
3 changed files with 16 additions and 31 deletions

View file

@ -34,37 +34,23 @@ model {
}
}
// The toolChains block is needed because Gradle doesn't find gcc/clang on ARM-based Linux
// and macOS platforms without explicitly declaring their targets. Might be a bug in the
// native Gradle plugin.
// The toolChains block is needed because Gradle doesn't find the native toolchain in various
// scenarios. These checks, can be removed when Gradle fixes them, and we advertise a
// minimum Gradle version that includes the fix.
toolChains {
if (isCurrentLinux()) {
gcc(Gcc) {
if (isCurrentArm_64()) {
target("linux_arm_64")
def current = getCurrentPlatformName()
if (isLinux(current)) {
// https://github.com/gradle/gradle/issues/17660 (fixed in Gradle 8.11)
gcc(Gcc).target(current)
clang(Clang).target(current)
}
if (isFreeBSD(current)) {
// https://github.com/gradle/gradle/issues/32895
gcc(Gcc).target(current)
clang(Clang).target(current)
}
}
if (isCurrentMac()) {
clang(Clang) {
if (isCurrentArm_64()) {
target("mac_arm_64")
}
}
}
if (isCurrentFreeBSD()) {
gcc(Gcc) {
if (isCurrentArm_64()) {
target("freebsd_arm_64")
}
else {
target("freebsd_x86_64")
}
}
}
if (isCurrentWindows() && VISUAL_STUDIO_INSTALL_DIR) {
// specify installDir because Gradle doesn't find VS Build Tools.
// See https://github.com/gradle/gradle-native/issues/617#issuecomment-575735288
if (isWindows(current) && VISUAL_STUDIO_INSTALL_DIR) {
// https://github.com/gradle/gradle-native/issues/617#issuecomment-575735288
visualCpp(VisualCpp) {
installDir = VISUAL_STUDIO_INSTALL_DIR
}

View file

@ -211,8 +211,7 @@ binaries for your platform, you will need the following installed on your system
App Store while _Command Line Tools for Xcode_ may be installed using the command:
`xcode-select --install`.
* __Linux/FreeBSD:__ the 64-bit versions of the following packages should installed:
* gcc 8.5 or later
* gcc-c++ / g++ 8.5 or later
* gcc/g++ or clang
* make
* __Windows:__
[Microsoft Visual Studio](https://visualstudio.microsoft.com/vs/community) 2017 or later, or

View file

@ -47,7 +47,7 @@ To create the latest development build for your platform from this source reposi
* [JDK 21 64-bit][jdk]
* [Gradle 8.5+][gradle] (or provided Gradle wrapper if Internet connection is available)
* [Python3][python3] (version 3.9 to 3.13) with bundled pip
* make, gcc, and g++ (Linux/macOS-only)
* make, gcc/g++ or clang (Linux/macOS-only)
* [Microsoft Visual Studio][vs] 2017+ or [Microsoft C++ Build Tools][vcbuildtools] with the
following components installed (Windows-only):
- MSVC