mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
Meta: Support Swift_Release preset in ladybird.py
This commit is contained in:
parent
a0173b342f
commit
ab661467e7
Notes:
github-actions[bot]
2025-06-11 17:56:04 +00:00
Author: https://github.com/ADKaster
Commit: ab661467e7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5047
2 changed files with 35 additions and 1 deletions
|
@ -18,6 +18,7 @@ from typing import Optional
|
|||
sys.path.append(str(Path(__file__).resolve().parent.parent))
|
||||
|
||||
from Meta.find_compiler import pick_host_compiler
|
||||
from Meta.find_compiler import pick_swift_compilers
|
||||
from Meta.host_platform import HostArchitecture
|
||||
from Meta.host_platform import HostSystem
|
||||
from Meta.host_platform import Platform
|
||||
|
@ -183,7 +184,10 @@ def configure_main(platform: Platform, preset: str, cc: str, cxx: str) -> Path:
|
|||
return build_preset_dir
|
||||
|
||||
validate_cmake_version()
|
||||
(cc, cxx) = pick_host_compiler(platform, cc, cxx)
|
||||
if "Swift" in preset:
|
||||
(cc, cxx, swiftc) = pick_swift_compilers(platform, ladybird_source_dir)
|
||||
else:
|
||||
(cc, cxx) = pick_host_compiler(platform, cc, cxx)
|
||||
|
||||
config_args = [
|
||||
"cmake",
|
||||
|
@ -197,6 +201,9 @@ def configure_main(platform: Platform, preset: str, cc: str, cxx: str) -> Path:
|
|||
f"-DCMAKE_CXX_COMPILER={cxx}",
|
||||
]
|
||||
|
||||
if "Swift" in preset:
|
||||
config_args.append(f"-DCMAKE_Swift_COMPILER={swiftc}")
|
||||
|
||||
if platform.host_system == HostSystem.Linux and platform.host_architecture == HostArchitecture.AArch64:
|
||||
config_args.extend(configure_skia_jemalloc())
|
||||
|
||||
|
@ -251,6 +258,7 @@ def configure_build_env(preset: str) -> tuple[Path, Path]:
|
|||
"Distribution": build_root_dir / "distribution",
|
||||
"Release": build_root_dir / "release",
|
||||
"Sanitizer": build_root_dir / "sanitizers",
|
||||
"Swift_Release": build_root_dir / "swift",
|
||||
"Windows_CI": build_root_dir / "release",
|
||||
"Windows_Experimental": build_root_dir / "debug",
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue