Skip to content

Commit ad43747

Browse files
rmacnak-googleCommit Queue
authored andcommitted
[vm] Move some VM defines out of platform.
TEST=build Bug: #32364 Change-Id: Icf0d8f69235ec0369cbe135f833a522a1269319f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433962 Reviewed-by: Siva Annamalai <[email protected]> Commit-Queue: Ryan Macnak <[email protected]>
1 parent f51d37e commit ad43747

File tree

6 files changed

+22
-20
lines changed

6 files changed

+22
-20
lines changed

runtime/platform/globals.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -731,24 +731,6 @@ DART_FORCE_INLINE D bit_copy(const S& source) {
731731
// Undefine math.h definition which clashes with our condition names.
732732
#undef OVERFLOW
733733

734-
// Include IL printer and disassembler functionality into non-PRODUCT builds,
735-
// in all AOT compiler builds or when forced.
736-
#if !defined(PRODUCT) || defined(DART_PRECOMPILER) || \
737-
defined(FORCE_INCLUDE_DISASSEMBLER)
738-
#if defined(DART_PRECOMPILED_RUNTIME) && defined(PRODUCT)
739-
#error Requested to include IL printer into PRODUCT AOT runtime
740-
#endif
741-
#define INCLUDE_IL_PRINTER 1
742-
#if !defined(FORCE_INCLUDE_DISASSEMBLER)
743-
#define FORCE_INCLUDE_DISASSEMBLER 1
744-
#endif
745-
#endif
746-
747-
// Include HeapSnapshotWriter functionality if not in PRODUCT.
748-
#if !defined(DART_ENABLE_HEAP_SNAPSHOT_WRITER) && !defined(PRODUCT)
749-
#define DART_ENABLE_HEAP_SNAPSHOT_WRITER 1
750-
#endif
751-
752734
#if defined(DART_HOST_OS_ANDROID)
753735
#define kHostOperatingSystemName "android"
754736
#elif defined(DART_HOST_OS_FUCHSIA)

runtime/vm/compiler/api/print_filter.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
4-
#include "platform/globals.h" // For INCLUDE_IL_PRINTER
4+
#include "vm/globals.h" // For INCLUDE_IL_PRINTER
55
#if defined(INCLUDE_IL_PRINTER)
66

77
#include "vm/compiler/api/print_filter.h"

runtime/vm/compiler/api/print_filter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#ifndef RUNTIME_VM_COMPILER_API_PRINT_FILTER_H_
66
#define RUNTIME_VM_COMPILER_API_PRINT_FILTER_H_
77

8-
#include "platform/globals.h" // For INCLUDE_IL_PRINTER
8+
#include "vm/globals.h" // For INCLUDE_IL_PRINTER
99

1010
#if defined(INCLUDE_IL_PRINTER)
1111

runtime/vm/compiler/backend/il_printer.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "vm/compiler/backend/linearscan.h"
1313
#include "vm/compiler/backend/range_analysis.h"
1414
#include "vm/compiler/ffi/native_calling_convention.h"
15+
#include "vm/globals.h"
1516
#include "vm/os.h"
1617
#include "vm/parser.h"
1718

runtime/vm/flag_list.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#define RUNTIME_VM_FLAG_LIST_H_
77

88
#include "platform/thread_sanitizer.h"
9+
#include "vm/globals.h"
910

1011
// Don't use USING_PRODUCT outside of this file.
1112
#if defined(PRODUCT)

runtime/vm/globals.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,24 @@ const intptr_t kDefaultNewGenSemiMaxSize = (kWordSize <= 4) ? 8 : 16;
112112
#define SUPPORT_TIMELINE 1
113113
#endif
114114

115+
// Include IL printer and disassembler functionality into non-PRODUCT builds,
116+
// in all AOT compiler builds or when forced.
117+
#if !defined(PRODUCT) || defined(DART_PRECOMPILER) || \
118+
defined(FORCE_INCLUDE_DISASSEMBLER)
119+
#if defined(DART_PRECOMPILED_RUNTIME) && defined(PRODUCT)
120+
#error Requested to include IL printer into PRODUCT AOT runtime
121+
#endif
122+
#define INCLUDE_IL_PRINTER 1
123+
#if !defined(FORCE_INCLUDE_DISASSEMBLER)
124+
#define FORCE_INCLUDE_DISASSEMBLER 1
125+
#endif
126+
#endif
127+
128+
// Include HeapSnapshotWriter functionality if not in PRODUCT.
129+
#if !defined(DART_ENABLE_HEAP_SNAPSHOT_WRITER) && !defined(PRODUCT)
130+
#define DART_ENABLE_HEAP_SNAPSHOT_WRITER 1
131+
#endif
132+
115133
#if defined(ARCH_IS_64_BIT) && !defined(IS_SIMARM_HOST64)
116134
#define HASH_IN_OBJECT_HEADER 1
117135
#endif

0 commit comments

Comments
 (0)