Ignore frame-larger-than warning for auto generated code.
Change-Id: I2fd44f7fd54899d905b2630c2373e02251562617
diff --git a/src/compiler_llvm/tools/gen_art_module_cc.sh b/src/compiler_llvm/tools/gen_art_module_cc.sh
index bc203a4..46360af 100755
--- a/src/compiler_llvm/tools/gen_art_module_cc.sh
+++ b/src/compiler_llvm/tools/gen_art_module_cc.sh
@@ -17,9 +17,34 @@
SCRIPTDIR=`dirname "$0"`
cd "${SCRIPTDIR}/.."
-OUTPUT_FILE=art_module.cc
+mkdir -p generated
+
+OUTPUT_FILE=generated/art_module.cc
echo "// Generated with ${0}" > ${OUTPUT_FILE}
-echo '' >> ${OUTPUT_FILE}
+
+echo '
+
+#pragma GCC diagnostic ignored "-Wframe-larger-than="
+// TODO: Remove this pragma after llc can generate makeLLVMModuleContents()
+// with smaller frame size.
+
+#include <llvm/DerivedTypes.h>
+#include <llvm/Function.h>
+#include <llvm/Module.h>
+#include <llvm/Type.h>
+
+#include <vector>
+
+using namespace llvm;
+
+namespace art {
+namespace compiler_llvm {
+
+' >> ${OUTPUT_FILE}
llc -march=cpp -cppgen=contents art_module.ll -o - >> ${OUTPUT_FILE}
+
+echo '
+} // namespace compiler_llvm
+} // namespace art' >> ${OUTPUT_FILE}