Remove the deprecated -ld_classic and -fembed-bitcode flags from the NativeScript target
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 66/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- ios, javascript
調査の方向性
v8ios.xcodeproj/project.pbxproj を開き、参照されている行にある NativeScript ターゲットの Debug と Release の OTHER_LDFLAGS および OTHER_CFLAGS エントリを確認します。非推奨のフラグを削除し、その後、一覧にある iOS、シミュレータ、Mac Catalyst、visionOS の各 slice をすべてビルドしてリンクします。すべての slice が成功するか、visionOS にのみ該当する例外を厳密に限定して文書化できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
The NativeScript target carries two linker/compiler flags that Apple has already retired. One of them is on a deprecation clock and will become a hard build failure.
-ld_classic
OTHER_LDFLAGS on the NativeScript target, both Debug and Release (v8ios.xcodeproj/project.pbxproj:2899 and :2992). Every link emits:
ld: warning: -ld_classic is deprecated and will be removed in a future release
It forces the old linker. Apple has said it is going away; when it does, this stops being a warning and starts failing the build.
It was added in bb364f95 ("feat(visionos): support for xros platform", #235), so it was most likely a workaround for a new-linker bug on xros at that time rather than something iOS ever needed. Whatever that bug was, it is worth re-testing against a current Xcode.
-fembed-bitcode
OTHER_CFLAGS on the same two configurations (:2896, :2989). Bitcode was deprecated in Xcode 14 and App Store submission has not accepted it for years. The flag is dead weight.
What needs doing
Remove both, then confirm the framework still links on every slice — arm64-iphoneos, arm64-iphonesimulator, x86_64-iphonesimulator, arm64-maccatalyst, x86_64-maccatalyst, arm64-xros, arm64-xrsimulator. visionOS is the one that matters: it is the platform -ld_classic was introduced for, so if anything regresses it will be there, and a build that only checks iOS proves nothing.
If visionOS does still need the classic linker, the flag should at minimum be narrowed to the visionOS configurations only and carry a comment saying what breaks without it, so the next person is not left guessing.
Not to be confused with
The same links also emit ~174 copies of:
ld: warning: direct access in function '...' from file 'libv8_base_without_compiler.a(...)'
to global weak symbol 'std::__1::piecewise_construct' from file '...ModuleInternalCallbacks.o'
means the weak symbol cannot be overridden at runtime.
Those are benign and out of scope here. V8 is built with chromium's default -fvisibility=hidden while the framework's own translation units use Xcode's default visibility, so both sides emit the same libc++ weak symbol and V8's objects bind to ours directly. The symbol is an empty tag struct used only for compile-time dispatch:
struct _LIBCPP_TEMPLATE_VIS piecewise_construct_t { explicit piecewise_construct_t() = default; };
inline constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();
It has no state and its address is never compared, so duplicate definitions are indistinguishable. The warning matters for typeinfo/vtable symbols (breaks dynamic_cast and cross-boundary catch) or operator new/delete (breaks allocator replacement) — a classification of a full Release-iphoneos link found all 174 to be the one tag constant and none of those. Matching visibility would silence them, but the framework has no EXPORTED_SYMBOLS_FILE, so -fvisibility=hidden would also hide the ObjC class symbols the public API needs.
- 主要言語
- JavaScript
- スター
- 150
- フォーク
- 43
- 平均マージ
- 3日 10時間
- マージ済み PR(30日)
- 22
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NativeScript/ios のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
NativeScript/ios#459 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
NativeScript/ios#445 ·
-
question
難易度 4/5 3〜5日 初心者へのやさしさ 34/100
NativeScript/ios#364 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
NativeScript/ios#355 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
NativeScript/ios#292 · コメント 9 件 ·
NativeScript/ios の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
avniproject/avni-client#2135 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bevyengine/bevy-website#2595 ·
-
ecosystem wording
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
matrix-org/matrix.org#3649 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
vadimdemedes/ink#1029 ·