[VM runtime] Disable dual mapping code in AOT runtime (fixes #36260).

Change-Id: I16058ab405536d94aafc169e6494c0a841fce3dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97347
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index 07d2d03..3078d07 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -376,8 +376,9 @@
 
 // Determine whether dual mapping of code pages is supported.
 // We test dual mapping on linux x64 and deploy it on fuchsia.
-#if defined(TARGET_OS_LINUX) && defined(TARGET_ARCH_X64) ||                    \
-    defined(TARGET_OS_FUCHSIA)
+#if !defined(DART_PRECOMPILED_RUNTIME) &&                                      \
+    (defined(TARGET_OS_LINUX) && defined(TARGET_ARCH_X64) ||                   \
+     defined(TARGET_OS_FUCHSIA))
 #define DUAL_MAPPING_SUPPORTED 1
 #endif