Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: runtime/vm/flags.h

Issue 1728713002: VM: Fix product build. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: make flags constant correctly in non-precompiled, product mode" Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/flags.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_FLAGS_H_ 5 #ifndef VM_FLAGS_H_
6 #define VM_FLAGS_H_ 6 #define VM_FLAGS_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/flag_list.h" 9 #include "vm/flag_list.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 #if defined(DEBUG) 105 #if defined(DEBUG)
106 #define DEBUG_FLAG_MARCO(name, type, default_value, comment) \ 106 #define DEBUG_FLAG_MARCO(name, type, default_value, comment) \
107 extern type FLAG_##name; 107 extern type FLAG_##name;
108 #else // defined(DEBUG) 108 #else // defined(DEBUG)
109 #define DEBUG_FLAG_MARCO(name, type, default_value, comment) \ 109 #define DEBUG_FLAG_MARCO(name, type, default_value, comment) \
110 const type FLAG_##name = default_value; 110 const type FLAG_##name = default_value;
111 #endif // defined(DEBUG) 111 #endif // defined(DEBUG)
112 112
113 #if defined(PRODUCT) && defined(DART_PRECOMPILED_RUNTIME) 113 #if defined(PRODUCT) && defined(DART_PRECOMPILED_RUNTIME)
114 #define RELEASE_FLAG_MARCO(name, precompiled_value, product_value, type, \ 114 #define RELEASE_FLAG_MARCO(name, product_value, type, default_value, comment) \
115 default_value, comment) \
116 const type FLAG_##name = product_value; 115 const type FLAG_##name = product_value;
117 #define PRECOMPILE_FLAG_MARCO(name, precompiled_value, product_value, type, \ 116 #define PRECOMPILE_FLAG_MARCO(name, precompiled_value, product_value, type, \
118 default_value, comment) \ 117 default_value, comment) \
119 const type FLAG_##name = precompiled_value; 118 const type FLAG_##name = precompiled_value;
120 119
121 #elif defined(PRODUCT) // !PRECOMPILED 120 #elif defined(PRODUCT) // !PRECOMPILED
122 #define RELEASE_FLAG_MARCO(name, product_value, type, default_value, comment) \ 121 #define RELEASE_FLAG_MARCO(name, product_value, type, default_value, comment) \
123 const type FLAG_##name = product_value; 122 const type FLAG_##name = product_value;
124 #define PRECOMPILE_FLAG_MARCO(name, precompiled_value, product_value, type, \ 123 #define PRECOMPILE_FLAG_MARCO(name, precompiled_value, product_value, type, \
125 default_value, comment) \ 124 default_value, comment) \
126 extern type FLAG_##name; 125 const type FLAG_##name = product_value;
127 126
128 #elif defined(DART_PRECOMPILED_RUNTIME) // !PRODUCT 127 #elif defined(DART_PRECOMPILED_RUNTIME) // !PRODUCT
129 #define RELEASE_FLAG_MARCO(name, product_value, type, default_value, comment) \ 128 #define RELEASE_FLAG_MARCO(name, product_value, type, default_value, comment) \
130 extern type FLAG_##name; 129 extern type FLAG_##name;
131 #define PRECOMPILE_FLAG_MARCO(name, precompiled_value, product_value, type, \ 130 #define PRECOMPILE_FLAG_MARCO(name, precompiled_value, product_value, type, \
132 default_value, comment) \ 131 default_value, comment) \
133 const type FLAG_##name = precompiled_value; 132 const type FLAG_##name = precompiled_value;
134 133
135 #else // !PRODUCT && !PRECOMPILED 134 #else // !PRODUCT && !PRECOMPILED
136 #define RELEASE_FLAG_MARCO(name, product_value, type, default_value, comment) \ 135 #define RELEASE_FLAG_MARCO(name, product_value, type, default_value, comment) \
(...skipping 11 matching lines...) Expand all
148 PRECOMPILE_FLAG_MARCO) 147 PRECOMPILE_FLAG_MARCO)
149 148
150 #undef RELEASE_FLAG_MARCO 149 #undef RELEASE_FLAG_MARCO
151 #undef DEBUG_FLAG_MARCO 150 #undef DEBUG_FLAG_MARCO
152 #undef PRODUCT_FLAG_MARCO 151 #undef PRODUCT_FLAG_MARCO
153 #undef PRECOMPILE_FLAG_MARCO 152 #undef PRECOMPILE_FLAG_MARCO
154 153
155 } // namespace dart 154 } // namespace dart
156 155
157 #endif // VM_FLAGS_H_ 156 #endif // VM_FLAGS_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698