Skip to content

Commit 9ceb7d3

Browse files
committed
reduce scope of PR
1 parent 9ec2d4c commit 9ceb7d3

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8544,9 +8544,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
85448544
}
85458545

85468546
if (IsCuda || (IsSYCLDevice && Triple.isNVPTX())) {
8547-
bool UseShortPtr = IsSYCLDevice && Triple.isNVPTX();
85488547
if (Args.hasFlag(options::OPT_fcuda_short_ptr,
8549-
options::OPT_fno_cuda_short_ptr, UseShortPtr))
8548+
options::OPT_fno_cuda_short_ptr, false))
85508549
CmdArgs.push_back("-fcuda-short-ptr");
85518550
}
85528551

libclc/CMakeLists.txt

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -506,10 +506,27 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
506506
list(APPEND build_flags -D__unix__)
507507
endif()
508508

509-
add_libclc_builtin_set(libspirv-${arch_suffix}
509+
string( TOUPPER "CLC_${MACRO_ARCH}" CLC_TARGET_DEFINE )
510+
511+
list( APPEND build_flags
512+
-D__CLC_INTERNAL
513+
-D${CLC_TARGET_DEFINE}
514+
# All libclc builtin libraries see CLC headers
515+
-I${CMAKE_CURRENT_SOURCE_DIR}/clc/include
516+
# FIXME: Fix libclc to not require disabling this noisy warning
517+
-Wno-bitwise-conditional-parentheses
518+
)
519+
520+
if( NOT "${cpu}" STREQUAL "" )
521+
list( APPEND build_flags -mcpu=${cpu} )
522+
endif()
523+
524+
add_libclc_builtin_set(
525+
CLC_INTERNAL
526+
ARCH ${ARCH}
527+
ARCH_SUFFIX clc-${arch_suffix}
510528
TRIPLE ${clang_triple}
511-
TARGET_ENV libspirv
512-
COMPILE_OPT ${build_flags}
529+
COMPILE_FLAGS ${build_flags}
513530
OPT_FLAGS ${opt_flags}
514531
LIB_FILES ${clc_lib_files}
515532
)

0 commit comments

Comments
 (0)