Skip to content

Commit 0c0aa56

Browse files
committed
Revert "compiler-rt: Introduce runtime functions for emulated PAC."
As well as followup "builtins: Speculative MSVC fix." This reverts commits 5b1db59 and f1c4df5. Needs fixes for failing tests which will take time to implement.
1 parent 3d08a40 commit 0c0aa56

File tree

9 files changed

+5
-225
lines changed

9 files changed

+5
-225
lines changed

compiler-rt/cmake/Modules/AddCompilerRT.cmake

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,7 @@ endmacro()
162162
# OBJECT_LIBS <object libraries to use as sources>
163163
# PARENT_TARGET <convenience parent target>
164164
# ADDITIONAL_HEADERS <header files>
165-
# EXTENSIONS <boolean>
166-
# C_STANDARD <version>
167-
# CXX_STANDARD <version>)
165+
# EXTENSIONS <boolean>)
168166
function(add_compiler_rt_runtime name type)
169167
if(NOT type MATCHES "^(OBJECT|STATIC|SHARED|MODULE)$")
170168
message(FATAL_ERROR
@@ -173,7 +171,7 @@ function(add_compiler_rt_runtime name type)
173171
endif()
174172
cmake_parse_arguments(LIB
175173
""
176-
"PARENT_TARGET;C_STANDARD;CXX_STANDARD"
174+
"PARENT_TARGET"
177175
"OS;ARCHS;SOURCES;CFLAGS;LINK_FLAGS;DEFS;DEPS;LINK_LIBS;OBJECT_LIBS;ADDITIONAL_HEADERS;EXTENSIONS"
178176
${ARGN})
179177
set(libnames)
@@ -362,12 +360,6 @@ function(add_compiler_rt_runtime name type)
362360
set_target_link_flags(${libname} ${extra_link_flags_${libname}})
363361
set_property(TARGET ${libname} APPEND PROPERTY
364362
COMPILE_DEFINITIONS ${LIB_DEFS})
365-
if(LIB_C_STANDARD)
366-
set_property(TARGET ${libname} PROPERTY C_STANDARD ${LIB_C_STANDARD})
367-
endif()
368-
if(LIB_CXX_STANDARD)
369-
set_property(TARGET ${libname} PROPERTY CXX_STANDARD ${LIB_CXX_STANDARD})
370-
endif()
371363
set_target_output_directories(${libname} ${output_dir_${libname}})
372364
install(TARGETS ${libname}
373365
ARCHIVE DESTINATION ${install_dir_${libname}}

compiler-rt/cmake/builtin-config-ix.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ builtin_check_c_compiler_flag("-Xclang -mcode-object-version=none" COMPILER_RT_H
2626
builtin_check_c_compiler_flag(-Wbuiltin-declaration-mismatch COMPILER_RT_HAS_WBUILTIN_DECLARATION_MISMATCH_FLAG)
2727
builtin_check_c_compiler_flag(/Zl COMPILER_RT_HAS_ZL_FLAG)
2828
builtin_check_c_compiler_flag(-fcf-protection=full COMPILER_RT_HAS_FCF_PROTECTION_FLAG)
29-
builtin_check_c_compiler_flag(-nostdinc++ COMPILER_RT_HAS_NOSTDINCXX_FLAG)
3029

3130
builtin_check_c_compiler_source(COMPILER_RT_HAS_ATOMIC_KEYWORD
3231
"

compiler-rt/lib/builtins/CMakeLists.txt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
66
cmake_minimum_required(VERSION 3.20.0)
77

88
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
9-
project(CompilerRTBuiltins C CXX ASM)
9+
project(CompilerRTBuiltins C ASM)
1010
set(COMPILER_RT_STANDALONE_BUILD TRUE)
1111
set(COMPILER_RT_BUILTINS_STANDALONE_BUILD TRUE)
1212

@@ -64,8 +64,6 @@ include(CMakePushCheckState)
6464
option(COMPILER_RT_BUILTINS_HIDE_SYMBOLS
6565
"Do not export any symbols from the static library." ON)
6666

67-
include_directories(../../../third-party/siphash/include)
68-
6967
# TODO: Need to add a mechanism for logging errors when builtin source files are
7068
# added to a sub-directory and not this CMakeLists file.
7169
set(GENERIC_SOURCES
@@ -591,7 +589,6 @@ set(aarch64_SOURCES
591589
${GENERIC_TF_SOURCES}
592590
${GENERIC_SOURCES}
593591
cpu_model/aarch64.c
594-
aarch64/emupac.cpp
595592
aarch64/fp_mode.c
596593
)
597594

@@ -839,7 +836,7 @@ else ()
839836
append_list_if(COMPILER_RT_ENABLE_CET -fcf-protection=full BUILTIN_CFLAGS)
840837
endif()
841838

842-
append_list_if(COMPILER_RT_HAS_NOSTDINCXX_FLAG -nostdinc++ BUILTIN_CFLAGS)
839+
append_list_if(COMPILER_RT_HAS_STD_C11_FLAG -std=c11 BUILTIN_CFLAGS)
843840
append_list_if(COMPILER_RT_HAS_WBUILTIN_DECLARATION_MISMATCH_FLAG -Werror=builtin-declaration-mismatch BUILTIN_CFLAGS)
844841

845842
# Don't embed directives for picking any specific CRT
@@ -961,8 +958,6 @@ else ()
961958
SOURCES ${${arch}_SOURCES}
962959
DEFS ${BUILTIN_DEFS}
963960
CFLAGS ${BUILTIN_CFLAGS_${arch}}
964-
C_STANDARD 11
965-
CXX_STANDARD 17
966961
PARENT_TARGET builtins)
967962
cmake_pop_check_state()
968963
endif ()

compiler-rt/lib/builtins/aarch64/emupac.cpp

Lines changed: 0 additions & 140 deletions
This file was deleted.

compiler-rt/lib/builtins/int_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ typedef union {
223223
#define CRT_HAS_TF_MODE
224224
#endif
225225

226-
#if __STDC_VERSION__ >= 199901L && !defined(_MSC_VER)
226+
#if __STDC_VERSION__ >= 199901L
227227
typedef float _Complex Fcomplex;
228228
typedef double _Complex Dcomplex;
229229
typedef long double _Complex Lcomplex;

compiler-rt/test/builtins/Unit/aarch64/emupac.c

Lines changed: 0 additions & 62 deletions
This file was deleted.

llvm/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,12 @@ static_library("builtins") {
7878
cflags += [ "-fomit-frame-pointer" ]
7979
}
8080
cflags_c = [ "-std=c11" ]
81-
cflags_cc = [ "-nostdinc++" ]
8281
}
8382

8483
defines = builtins_defines
8584
sources = builtins_sources
8685

8786
deps = lse_targets
88-
include_dirs = [ "//third-party/siphash/include" ]
8987
}
9088

9189
# Currently unused but necessary to make sync_source_lists_from_cmake.py happy.

llvm/utils/gn/secondary/compiler-rt/lib/builtins/sources.gni

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,6 @@ if (current_cpu == "arm") {
429429
if (current_cpu == "arm64") {
430430
builtins_sources -= [ "fp_mode.c" ]
431431
builtins_sources += [
432-
"aarch64/emupac.cpp",
433432
"aarch64/fp_mode.c",
434433
"cpu_model/aarch64.c",
435434
]

llvm/utils/gn/secondary/compiler-rt/test/builtins/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ if (current_toolchain != host_toolchain) {
4646
"//compiler-rt/include($host_toolchain)",
4747
"//compiler-rt/lib/builtins",
4848
"//compiler-rt/test:lit_common_configured",
49-
"//llvm/utils/not($host_toolchain)",
5049
]
5150
}
5251
}

0 commit comments

Comments
 (0)