From 92dfec2320421113498ae7b5b72e78bd8b5b09a8 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 21 Jun 2022 09:25:51 -0700 Subject: Add CPU executable compile test (#2278) * Add cpu executable compile test * Fix. * Fix permission on linux * retrigger build Co-authored-by: Yong He --- source/slang/slang-emit-cpp.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/slang/slang-emit-cpp.cpp') diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index c23135c70..31f09e400 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -2595,6 +2595,15 @@ void CPPSourceEmitter::_maybeEmitExportLike(IRInst* inst) // Specially handle export, as we don't want to emit it multiple times if (getTargetReq()->isWholeProgramRequest()) { + if (auto nameHint = inst->findDecoration()) + { + if (nameHint->getName() == "main") + { + // Don't output any decorations on main function. + return; + } + } + bool isExternC = false; bool isExported = false; -- cgit v1.2.3