mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
Meta: Fix detection of default compiler versions
The logic in this script was *intended* to use the system's default compiler if it was sufficiently new, and only start searching for the latest installed if the default was not suitable. However, the `cxx` program does not exist on Unixes, so the version check always failed. We should be using the standard `c++` program name instead. After this change, the `CC` and `CXX` environment variables will have to be used if someone wants to force a newer compiler version.
This commit is contained in:
parent
8b1341c77e
commit
060e6f4d21
Notes:
sideshowbarker
2024-07-18 22:57:59 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/SerenityOS/serenity/commit/060e6f4d21 Pull-request: https://github.com/SerenityOS/serenity/pull/24394
2 changed files with 2 additions and 2 deletions
|
@ -50,7 +50,7 @@ find_newest_compiler() {
|
||||||
|
|
||||||
pick_host_compiler() {
|
pick_host_compiler() {
|
||||||
CC=${CC:-"cc"}
|
CC=${CC:-"cc"}
|
||||||
CXX=${CXX:-"cxx"}
|
CXX=${CXX:-"c++"}
|
||||||
|
|
||||||
if is_supported_compiler "$CC" && is_supported_compiler "$CXX"; then
|
if is_supported_compiler "$CC" && is_supported_compiler "$CXX"; then
|
||||||
return
|
return
|
||||||
|
|
|
@ -40,7 +40,7 @@ If you modify `args.gn` outside of `gn args`, be sure to run `gn gen` again to r
|
||||||
|
|
||||||
On macOS, the default args should work out of the box. For compiling Ladybird there won't be any tailoring needed if you have Qt6 installed via homebrew and the Xcode tools installed.
|
On macOS, the default args should work out of the box. For compiling Ladybird there won't be any tailoring needed if you have Qt6 installed via homebrew and the Xcode tools installed.
|
||||||
|
|
||||||
On Ubuntu, it's likely that the default ``cc`` and ``cxx`` will not be able to compile the project. For compiling Ladybird, a typical ``args.gn`` might look like the below:
|
On Ubuntu, it's likely that the default ``cc`` and ``c++`` will not be able to compile the project. For compiling Ladybird, a typical ``args.gn`` might look like the below:
|
||||||
|
|
||||||
args.gn
|
args.gn
|
||||||
```gn
|
```gn
|
||||||
|
|
Loading…
Reference in a new issue