forked from TelegramMessenger/Telegram-iOS
-
Notifications
You must be signed in to change notification settings - Fork 119
Expand file tree
/
Copy path.bazelrc
More file actions
64 lines (55 loc) · 2.87 KB
/
Copy path.bazelrc
File metadata and controls
64 lines (55 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
build --action_env=ZERO_AR_DATE=1
build --apple_platform_type=ios
build --enable_platform_specific_config
build --apple_crosstool_top=@local_config_apple_cc//:toolchain
build --crosstool_top=@local_config_apple_cc//:toolchain
build --host_crosstool_top=@local_config_apple_cc//:toolchain
build --per_file_copt=".*\.m$","@-fno-objc-msgsend-selector-stubs"
build --per_file_copt=".*\.mm$","@-fno-objc-msgsend-selector-stubs"
build --features=debug_prefix_map_pwd_is_dot
build --features=swift.cacheable_swiftmodules
build --features=swift.debug_prefix_map
build --features=swift.enable_vfsoverlays
build:dbg --features=swift.emit_swiftsourceinfo
build --strategy=Genrule=standalone
build --spawn_strategy=standalone
build --strategy=SwiftCompile=worker
# Nicegram fork policy: our min-iOS bump (13 -> 15) introduced many deprecation
# warnings in upstream-owned files that we deliberately don't fix ourselves —
# upstream Telegram will clean them up when they bump min-iOS. To keep strict-
# warnings policy (`-warnings-as-errors` for Swift, `-Werror` for Clang) intact
# everywhere else, we demote only deprecation diagnostics back to warning.
#
# Swift: `-Wwarning DeprecatedDeclaration` re-classifies the diagnostic group
# back to warning even under `-warnings-as-errors`. rules_swift appends
# `--@//swift:copt` flags AFTER per-target `copts`, so this override wins.
# Requires Swift 5.10+ / Xcode 15.3+ (older toolchains reject `-Wwarning`).
#
# Clang: `-Wno-error=deprecated-declarations` via --per_file_copt does the
# same for `.m`/`.mm` sources. Per-file copts are appended AFTER target-level
# `copts`, so the override wins over `-Werror`. Scoped to ObjC because the
# affected APIs are iOS-SDK constants like UTTypeConformsTo / kUTTypeGIF;
# pure C/C++ targets (boringssl, td, brotli, libphonenumber, libjxl) don't
# touch them and stay strict.
#
# TODO: remove these four lines once upstream Telegram bumps its min-iOS to
# >= 15 and the deprecation warnings are gone.
build --@build_bazel_rules_swift//swift:copt=-Wwarning
build --@build_bazel_rules_swift//swift:copt=DeprecatedDeclaration
build --per_file_copt=".*\.m$","@-Wno-error=deprecated-declarations"
build --per_file_copt=".*\.mm$","@-Wno-error=deprecated-declarations"
#common --registry=https://raw.githubusercontent.com/bazelbuild/bazel-central-registry/main/
# SourceKit BSP: Swift indexing features
common --features=swift.index_while_building
common --features=swift.use_global_index_store
common --features=swift.use_global_module_cache
common --features=oso_prefix_is_pwd
# SourceKit BSP: Index build config (used for background indexing)
common:index_build --experimental_convenience_symlinks=ignore
common:index_build --show_result=0
common:index_build --noshow_loading_progress
common:index_build --noshow_progress
common:index_build --noannounce_rc
common:index_build --noshow_timestamps
common:index_build --curses=no
common:index_build --color=no