Allow Tools to be built with valgrind support. With these changes,
adding "export USE_VALGRIND=1" in Local.mk will build a version of
Tools that works with valgrind.
Also includes a change to turn off appLoader for vmtoosld
and toolbox-cmd.
#else
state->ctx.mainLoop = g_main_loop_new(gctx, FALSE);
#endif
+ /*
+ * Valgrind can't handle the backdoor check.
+ */
+#ifdef USE_VALGRIND
+ state->ctx.isVMware = TRUE;
+#else
state->ctx.isVMware = VmCheck_IsVirtualWorld();
+#endif
g_main_context_unref(gctx);
g_type_init();
/*
* Check if we are in a VM
+ *
+ * Valgrind can't handle the backdoor check, so don't bother.
*/
+#ifndef USE_VALGRIND
if (!VmCheck_IsVirtualWorld()) {
g_printerr(SU_(error.novirtual, "%s must be run inside a virtual machine.\n"),
argv[0]);
goto exit;
}
+#endif
/*
* Parse the command line optional arguments