Skip to content

Commit 92b58b3

Browse files
authored
[SPEC] Workaround error with latest clang in 523.xalancbmk_r (#118)
xalan-c contains a latent error in a template that isn't instantiated, which after llvm/llvm-project#90152 means 523.xalancbmk_r and 483.xalancbmk will now fail to build. We can workaround it by setting -fdelayed-template-parsing.
1 parent 0ed6b20 commit 92b58b3

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

External/SPEC/CINT2006/483.xalancbmk/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ add_definitions(
1414

1515
list(APPEND CXXFLAGS -std=gnu++98)
1616

17+
include(CheckCXXCompilerFlag)
18+
check_cxx_compiler_flag(-fdelayed-template-parsing
19+
HAVE_CXX_FLAG_FDELAYED_TEMPLATE_PARSING)
20+
if(HAVE_CXX_FLAG_FDELAYED_TEMPLATE_PARSING)
21+
add_compile_options(-fdelayed-template-parsing)
22+
endif()
23+
1724
include_directories(
1825
${CMAKE_CURRENT_SOURCE_DIR}
1926
${BENCHMARK_DIR}/src

External/SPEC/CINT2017rate/523.xalancbmk_r/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ speccpu2017_benchmark(RATE)
88

99
set(CMAKE_CXX_STANDARD 14)
1010

11+
include(CheckCXXCompilerFlag)
12+
check_cxx_compiler_flag(-fdelayed-template-parsing
13+
HAVE_CXX_FLAG_FDELAYED_TEMPLATE_PARSING)
14+
if(HAVE_CXX_FLAG_FDELAYED_TEMPLATE_PARSING)
15+
add_compile_options(-fdelayed-template-parsing)
16+
endif()
17+
1118
add_definitions(
1219
-DAPP_NO_THREADS
1320
-DXALAN_INMEM_MSG_LOADER

0 commit comments

Comments
 (0)