[compiler-rt] f3671de - Revert "[ORC-RT] Configure the ORC runtime for more architectures and platforms"
Ben Langmuir via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 20 15:32:58 PDT 2021
Author: Ben Langmuir
Date: 2021-10-20T15:32:06-07:00
New Revision: f3671de5500ff1f8210419226a9603a7d83b1a31
URL: https://github.com/llvm/llvm-project/commit/f3671de5500ff1f8210419226a9603a7d83b1a31
DIFF: https://github.com/llvm/llvm-project/commit/f3671de5500ff1f8210419226a9603a7d83b1a31.diff
LOG: Revert "[ORC-RT] Configure the ORC runtime for more architectures and platforms"
Broke on aarch64-linux. Reverting while I investigate.
This reverts commit 5692ed0cce8c9506eef40ffe6ca2d9629956c51c.
Added:
Modified:
compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
compiler-rt/cmake/config-ix.cmake
compiler-rt/lib/orc/CMakeLists.txt
compiler-rt/lib/orc/elfnix_tls.x86-64.S
compiler-rt/lib/orc/macho_tlv.x86-64.S
compiler-rt/lib/orc/simple_packed_serialization.h
Removed:
################################################################################
diff --git a/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake b/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
index 86fa3bb5527fa..882e12ada0279 100644
--- a/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
+++ b/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
@@ -78,5 +78,5 @@ endif()
set(ALL_SHADOWCALLSTACK_SUPPORTED_ARCH ${ARM64})
if (UNIX)
-set(ALL_ORC_SUPPORTED_ARCH ${X86_64} ${ARM64} ${ARM32})
+set(ALL_ORC_SUPPORTED_ARCH ${X86_64})
endif()
diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
index 7624605cf1f86..e2985dccc645f 100644
--- a/compiler-rt/cmake/config-ix.cmake
+++ b/compiler-rt/cmake/config-ix.cmake
@@ -480,7 +480,6 @@ if(APPLE)
list(APPEND PROFILE_SUPPORTED_OS ${platform}sim)
list(APPEND TSAN_SUPPORTED_OS ${platform}sim)
list(APPEND FUZZER_SUPPORTED_OS ${platform}sim)
- list(APPEND ORC_SUPPORTED_OS ${platform}sim)
endif()
foreach(arch ${DARWIN_${platform}sim_ARCHS})
list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
@@ -511,7 +510,6 @@ if(APPLE)
list(APPEND TSAN_SUPPORTED_OS ${platform})
endif()
list(APPEND FUZZER_SUPPORTED_OS ${platform})
- list(APPEND ORC_SUPPORTED_OS ${platform})
endif()
foreach(arch ${DARWIN_${platform}_ARCHS})
list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
diff --git a/compiler-rt/lib/orc/CMakeLists.txt b/compiler-rt/lib/orc/CMakeLists.txt
index cc57707a64799..7259f953f3112 100644
--- a/compiler-rt/lib/orc/CMakeLists.txt
+++ b/compiler-rt/lib/orc/CMakeLists.txt
@@ -10,7 +10,8 @@ set(ORC_SOURCES
)
# Implementation files for all ORC architectures.
-set(ALL_ORC_ASM_SOURCES
+set(x86_64_SOURCES
+# x86-64 specific assembly files will go here.
macho_tlv.x86-64.S
elfnix_tls.x86-64.S
)
@@ -35,7 +36,7 @@ set(ORC_IMPL_HEADERS
# consumption by tests.
set(ORC_ALL_SOURCE_FILES
${ORC_SOURCES}
- ${ALL_ORC_ASM_SOURCES}
+ ${x86_64_SOURCES}
${ORC_IMPL_HEADERS}
)
@@ -60,16 +61,17 @@ if (TARGET cxx-headers OR HAVE_LIBCXX)
endif()
if (APPLE)
- add_asm_sources(ORC_ASM_SOURCES macho_tlv.x86-64.S)
+ add_asm_sources(ORC_ASM_SOURCES macho_tlv.x86-64.S)
add_compiler_rt_object_libraries(RTOrc
OS ${ORC_SUPPORTED_OS}
ARCHS ${ORC_SUPPORTED_ARCH}
- SOURCES ${ORC_SOURCES} ${ORC_ASM_SOURCES}
+ SOURCES ${ORC_SOURCES} ${x86_64_SOURCES}
ADDITIONAL_HEADERS ${ORC_IMPL_HEADERS}
CFLAGS ${ORC_CFLAGS}
DEPS ${ORC_DEPS})
+ # We only support running on osx for now.
add_compiler_rt_runtime(clang_rt.orc
STATIC
OS ${ORC_SUPPORTED_OS}
@@ -80,16 +82,13 @@ if (APPLE)
LINK_LIBS ${ORC_LINK_LIBS}
PARENT_TARGET orc)
else() # not Apple
- add_asm_sources(ORC_ASM_SOURCES elfnix_tls.x86-64.S)
-
foreach(arch ${ORC_SUPPORTED_ARCH})
if(NOT CAN_TARGET_${arch})
continue()
endif()
-
add_compiler_rt_object_libraries(RTOrc
ARCHS ${arch}
- SOURCES ${ORC_SOURCES} ${ORC_ASM_SOURCES}
+ SOURCES ${ORC_SOURCES} ${${arch}_SOURCES}
ADDITIONAL_HEADERS ${ORC_IMPL_HEADERS}
CFLAGS ${ORC_CFLAGS}
DEPS ${ORC_DEPS})
diff --git a/compiler-rt/lib/orc/elfnix_tls.x86-64.S b/compiler-rt/lib/orc/elfnix_tls.x86-64.S
index b3e0bef008674..0b0d7b355b8fc 100644
--- a/compiler-rt/lib/orc/elfnix_tls.x86-64.S
+++ b/compiler-rt/lib/orc/elfnix_tls.x86-64.S
@@ -11,9 +11,6 @@
//
//===----------------------------------------------------------------------===//
-// The content of this file is x86_64-only
-#if defined(__x86_64__)
-
#define REGISTER_SAVE_SPACE_SIZE 512
.text
@@ -60,5 +57,3 @@ ___orc_rt_elfnix_tls_get_addr:
addq $REGISTER_SAVE_SPACE_SIZE, %rsp
popq %rbp
ret
-
-#endif // defined(__x86_64__)
diff --git a/compiler-rt/lib/orc/macho_tlv.x86-64.S b/compiler-rt/lib/orc/macho_tlv.x86-64.S
index e3daf23e3029e..0affe403eec23 100644
--- a/compiler-rt/lib/orc/macho_tlv.x86-64.S
+++ b/compiler-rt/lib/orc/macho_tlv.x86-64.S
@@ -10,9 +10,6 @@
//
//===----------------------------------------------------------------------===//
-// The content of this file is x86_64-only
-#if defined(__x86_64__)
-
#define REGISTER_SAVE_SPACE_SIZE 512
.text
@@ -69,5 +66,3 @@ ___orc_rt_macho_tlv_get_addr:
addq $REGISTER_SAVE_SPACE_SIZE, %rsp
popq %rbp
ret
-
-#endif // defined(__x86_64__)
diff --git a/compiler-rt/lib/orc/simple_packed_serialization.h b/compiler-rt/lib/orc/simple_packed_serialization.h
index 3a6d245ba8227..b00707e50e462 100644
--- a/compiler-rt/lib/orc/simple_packed_serialization.h
+++ b/compiler-rt/lib/orc/simple_packed_serialization.h
@@ -396,12 +396,10 @@ template <> class SPSSerializationTraits<SPSString, __orc_rt::string_view> {
uint64_t Size;
if (!SPSArgList<uint64_t>::deserialize(IB, Size))
return false;
- if (Size > std::numeric_limits<size_t>::max())
- return false;
Data = IB.data();
if (!IB.skip(Size))
return false;
- S = {Data, static_cast<size_t>(Size)};
+ S = {Data, Size};
return true;
}
};
More information about the llvm-commits
mailing list