Skip to content

Commit 369fdb7

Browse files
Clement Skaucommit-bot@chromium.org
authored andcommitted
[SDK] Fixes FORCE_INCLUDE_DISASSEMBLER build in PRODUCT.
CodeObservers is not available in PRODUCT, but FORCE_INCLUDE_DISASSEMBLER will enable code that uses (but doesn't strictly need) it. This is related to https://dart-review.googlesource.com/c/sdk/+/125404. Tested: ./tools/build.py --arch x64 --mode product dart_precompiled_runtime gen_snapshot Change-Id: I5f0c0765a608b50704045c918b41c71398b89390 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125263 Reviewed-by: Martin Kustermann <[email protected]> Commit-Queue: Clement Skau <[email protected]>
1 parent 0438856 commit 369fdb7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

runtime/vm/clustered_snapshot.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1575,12 +1575,14 @@ class CodeDeserializationCluster : public DeserializationCluster {
15751575

15761576
#if !defined(PRODUCT) || defined(FORCE_INCLUDE_DISASSEMBLER)
15771577
void PostLoad(const Array& refs, Snapshot::Kind kind, Zone* zone) {
1578+
#if !defined(PRODUCT)
15781579
if (!CodeObservers::AreActive() && !FLAG_support_disassembler) return;
1580+
#endif
15791581
Code& code = Code::Handle(zone);
15801582
Object& owner = Object::Handle(zone);
15811583
for (intptr_t id = start_index_; id < stop_index_; id++) {
15821584
code ^= refs.At(id);
1583-
#if !defined(DART_PRECOMPILED_RUNTIME)
1585+
#if !defined(DART_PRECOMPILED_RUNTIME) && !defined(PRODUCT)
15841586
if (CodeObservers::AreActive()) {
15851587
Code::NotifyCodeObservers(code, code.is_optimized());
15861588
}

0 commit comments

Comments
 (0)