Update build system

This commit is contained in:
Isaac 2025-11-17 23:16:39 +08:00
parent a2f71562f6
commit 49ae84062b
1448 changed files with 835035 additions and 140 deletions

51
.vscode/launch.json vendored
View file

@ -1,44 +1,39 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "swift",
"request": "launch",
"args": [],
"cwd": "${workspaceFolder:telegram-ios}",
"name": "Debug Telegram",
"program": "${workspaceFolder:telegram-ios}/.build/debug/Telegram",
"preLaunchTask": "swift: Build Debug Telegram"
"type": "lldb-dap",
"request": "attach",
"preLaunchTask": "_launch_telegram",
"debuggerRoot": "${workspaceFolder}",
"attachCommands": [
"process connect connect://localhost:6667"
],
"internalConsoleOptions": "openOnSessionStart",
"timeout": 1000
},
{
"type": "swift",
"request": "launch",
"args": [],
"cwd": "${workspaceFolder:telegram-ios}",
"name": "Release Telegram",
"program": "${workspaceFolder:telegram-ios}/.build/release/Telegram",
"preLaunchTask": "swift: Build Release Telegram"
"cwd": "${workspaceFolder:Telegram}",
"name": "Debug sourcekit-bazel-bsp",
"preLaunchTask": "swift: Build Debug sourcekit-bazel-bsp",
"target": "sourcekit-bazel-bsp",
"configuration": "debug"
},
{
"type": "swift",
"request": "launch",
"args": [],
"cwd": "${workspaceFolder:telegram-ios}",
"name": "Debug telegram-ios",
"program": "${workspaceFolder:telegram-ios}/.build/debug/telegram-ios",
"preLaunchTask": "swift: Build Debug telegram-ios"
},
{
"type": "swift",
"request": "launch",
"args": [],
"cwd": "${workspaceFolder:telegram-ios}",
"name": "Release telegram-ios",
"program": "${workspaceFolder:telegram-ios}/.build/release/telegram-ios",
"preLaunchTask": "swift: Build Release telegram-ios"
"cwd": "${workspaceFolder:Telegram}",
"name": "Release sourcekit-bazel-bsp",
"preLaunchTask": "swift: Build Release sourcekit-bazel-bsp",
"target": "sourcekit-bazel-bsp",
"configuration": "release"
}
]
],
"options": {
"console": "integratedTerminal",
}
}

83
.vscode/tasks.json vendored
View file

@ -1,6 +1,79 @@
{
"version": "2.0.0",
"tasks": [
]
}
"version": "2.0.0",
"tasks": [
{
"label": "Build Telegram",
"type": "shell",
"command": "${workspaceFolder}/build-input/bazel-8.3.1-darwin-arm64",
"args": [
"build",
"Telegram/Telegram",
"--features=swift.use_global_module_cache",
"--verbose_failures",
"--remote_cache_async",
"--features=swift.skip_function_bodies_for_derived_files",
"--jobs=16",
"--define=buildNumber=10000",
"--define=telegramVersion=12.2.2",
"--disk_cache=${HOME}/telegram-bazel-cache",
"-c",
"dbg",
"--ios_multi_cpus=sim_arm64",
"--watchos_cpus=arm64_32",
"--features=swift.enable_batch_mode"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"runOptions": {
"instanceLimit": 1
}
},
// Hidden never-ending task that handles the launch / debugging bits for Cmd+Shift+D.
// The problemMatcher field defines when the task is effectively ready to be debugged
// by the attach task in launch.json.
{
"label": "_launch_telegram",
"type": "shell",
"command": "./scripts/launch_and_debug.sh",
"presentation": {
"reveal": "always"
},
"hide": true,
"isBackground": true,
"problemMatcher": [
{
"pattern": [
{
"regexp": "\\b\\B",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": "^.*Building....*",
"endsPattern": "^.*Listening to port 6667 for a connection from .*"
}
}
],
"runOptions": {
"instanceLimit": 1
}
},
{
"label": "Stream SourceKitBazelBSP Logs",
"type": "shell",
"command": "log stream --process sourcekit-bazel-bsp --debug",
"problemMatcher": [],
"isBackground": false,
"presentation": {
"reveal": "always",
"panel": "dedicated"
}
}
]
}