Index: runtime/vm/flags.h |
diff --git a/runtime/vm/flags.h b/runtime/vm/flags.h |
index d3e4869f28f6a9e858eb9a56c265098590f84a73..81e69c04d141e7972e38fe1ffe7872f5999dfd2b 100644 |
--- a/runtime/vm/flags.h |
+++ b/runtime/vm/flags.h |
@@ -110,23 +110,47 @@ class Flags { |
const type FLAG_##name = default_value; |
#endif // defined(DEBUG) |
-#if defined(PRODUCT) |
+#if defined(PRODUCT) && defined(DART_PRECOMPILED_RUNTIME) |
+#define RELEASE_FLAG_MARCO(name, precompiled_value, product_value, type, \ |
+ default_value, comment) \ |
+ const type FLAG_##name = product_value; |
+#define PRECOMPILE_FLAG_MARCO(name, precompiled_value, product_value, type, \ |
+ default_value, comment) \ |
+ const type FLAG_##name = precompiled_value; |
+ |
+#elif defined(PRODUCT) // !PRECOMPILED |
#define RELEASE_FLAG_MARCO(name, product_value, type, default_value, comment) \ |
const type FLAG_##name = product_value; |
+#define PRECOMPILE_FLAG_MARCO(name, precompiled_value, product_value, type, \ |
+ default_value, comment) \ |
+ extern type FLAG_##name; |
-#else // defined(PRODUCT) |
+#elif defined(DART_PRECOMPILED_RUNTIME) // !PRODUCT |
+#define RELEASE_FLAG_MARCO(name, product_value, type, default_value, comment) \ |
+ extern type FLAG_##name; |
+#define PRECOMPILE_FLAG_MARCO(name, precompiled_value, product_value, type, \ |
+ default_value, comment) \ |
+ const type FLAG_##name = precompiled_value; |
+#else // !PRODUCT && !PRECOMPILED |
#define RELEASE_FLAG_MARCO(name, product_value, type, default_value, comment) \ |
extern type FLAG_##name; |
+#define PRECOMPILE_FLAG_MARCO(name, precompiled_value, product_value, type, \ |
+ default_value, comment) \ |
+ extern type FLAG_##name; |
-#endif // defined(PRODUCT) |
+#endif |
// Now declare all flags here. |
-FLAG_LIST(PRODUCT_FLAG_MARCO, RELEASE_FLAG_MARCO, DEBUG_FLAG_MARCO) |
+FLAG_LIST(PRODUCT_FLAG_MARCO, |
+ RELEASE_FLAG_MARCO, |
+ DEBUG_FLAG_MARCO, |
+ PRECOMPILE_FLAG_MARCO) |
#undef RELEASE_FLAG_MARCO |
#undef DEBUG_FLAG_MARCO |
#undef PRODUCT_FLAG_MARCO |
+#undef PRECOMPILE_FLAG_MARCO |
} // namespace dart |