From 52e4b6a4cb1a94f1814de02b9c002b001d37b51e Mon Sep 17 00:00:00 2001 From: Mark Stoodley Date: Wed, 23 Aug 2023 16:47:01 -0400 Subject: [PATCH 1/2] tril project should require OMR_COMPILER_TEST to be enabled Some nondeterminism here if tril is built first then some needed header files needed aren't present and the build will fail. This commit ensures that OMR_COMPILER_TEST has been set if the fvtest/tril project is to be enabled. Signed-off-by: Mark Stoodley --- fvtest/tril/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fvtest/tril/CMakeLists.txt b/fvtest/tril/CMakeLists.txt index 3c785651ed6..af38c392ab4 100644 --- a/fvtest/tril/CMakeLists.txt +++ b/fvtest/tril/CMakeLists.txt @@ -22,6 +22,9 @@ project(tril_project) set(OMR_WARNINGS_AS_ERRORS OFF) +if(NOT OMR_TEST_COMPILER) + message(FATAL_ERROR "tril requries -DOMR_TEST_COMPILER=1") +endif(NOT OMR_TEST_COMPILER) add_subdirectory(tril) add_subdirectory(test) From 0ab1886df1c6b202479a41cf5733d32eb9c54bfc Mon Sep 17 00:00:00 2001 From: Mark Stoodley Date: Wed, 23 Aug 2023 16:49:23 -0400 Subject: [PATCH 2/2] JitBuilder method symbols should use TR_System linkage convention Discovered on Aarch64 but it's something we should do consistently for all platforms. Signed-off-by: Mark Stoodley --- compiler/ilgen/OMRIlBuilder.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/ilgen/OMRIlBuilder.cpp b/compiler/ilgen/OMRIlBuilder.cpp index 402a7f3a9d9..dc25344cf17 100644 --- a/compiler/ilgen/OMRIlBuilder.cpp +++ b/compiler/ilgen/OMRIlBuilder.cpp @@ -2022,6 +2022,7 @@ OMR::IlBuilder::ComputedCall(const char *functionName, int32_t numArgs, ...) TR_ASSERT_FATAL(resolvedMethod, "Could not identify function %s\n", functionName); TR::SymbolReference *methodSymRef = symRefTab()->findOrCreateComputedStaticMethodSymbol(JITTED_METHOD_INDEX, -1, resolvedMethod); + methodSymRef->getSymbol()->getMethodSymbol()->setLinkage(TR_System); return genCall(methodSymRef, numArgs, argValues, false /*isDirectCall*/); } @@ -2041,6 +2042,7 @@ OMR::IlBuilder::ComputedCall(const char *functionName, int32_t numArgs, TR::IlVa TR_ASSERT_FATAL(resolvedMethod, "Could not identify function %s\n", functionName); TR::SymbolReference *methodSymRef = symRefTab()->findOrCreateComputedStaticMethodSymbol(JITTED_METHOD_INDEX, -1, resolvedMethod); + methodSymRef->getSymbol()->getMethodSymbol()->setLinkage(TR_System); return genCall(methodSymRef, numArgs, argValues, false /*isDirectCall*/); } @@ -2143,6 +2145,7 @@ OMR::IlBuilder::Call(const char *functionName, int32_t numArgs, ...) TR_ASSERT_FATAL(resolvedMethod, "Could not identify function %s\n", functionName); TR::SymbolReference *methodSymRef = symRefTab()->findOrCreateStaticMethodSymbol(JITTED_METHOD_INDEX, -1, resolvedMethod); + methodSymRef->getSymbol()->getMethodSymbol()->setLinkage(TR_System); return genCall(methodSymRef, numArgs, argValues); } @@ -2156,6 +2159,7 @@ OMR::IlBuilder::Call(const char *functionName, int32_t numArgs, TR::IlValue ** a TR_ASSERT_FATAL(resolvedMethod, "Could not identify function %s\n", functionName); TR::SymbolReference *methodSymRef = symRefTab()->findOrCreateStaticMethodSymbol(JITTED_METHOD_INDEX, -1, resolvedMethod); + methodSymRef->getSymbol()->getMethodSymbol()->setLinkage(TR_System); return genCall(methodSymRef, numArgs, argValues); }