diff options
Diffstat (limited to 'libclc')
| -rw-r--r-- | libclc/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | libclc/clc/include/clc/float/definitions.h | 4 | ||||
| -rw-r--r-- | libclc/clc/include/clc/shared/unary_def_scalarize_loop.inc | 28 | ||||
| -rw-r--r-- | libclc/clc/include/clc/shared/unary_def_with_ptr_scalarize.inc | 106 | ||||
| -rw-r--r-- | libclc/clc/lib/generic/math/clc_erf.cl | 2 | ||||
| -rw-r--r-- | libclc/clc/lib/generic/math/clc_erfc.cl | 2 | ||||
| -rw-r--r-- | libclc/clc/lib/generic/math/clc_ldexp.cl | 9 | ||||
| -rw-r--r-- | libclc/clc/lib/generic/math/clc_lgamma_r.cl | 71 | ||||
| -rw-r--r-- | libclc/clc/lib/generic/math/clc_rsqrt.inc | 3 | ||||
| -rw-r--r-- | libclc/clc/lib/generic/math/clc_sqrt.inc | 3 | ||||
| -rw-r--r-- | libclc/cmake/modules/AddLibclc.cmake | 20 |
11 files changed, 170 insertions, 84 deletions
diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt index 5c4e12793329..c75f450d8d3a 100644 --- a/libclc/CMakeLists.txt +++ b/libclc/CMakeLists.txt @@ -394,6 +394,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} ) message( STATUS " device: ${d} ( ${${d}_aliases} )" ) + set( MACRO_ARCH ${ARCH} ) if ( ARCH STREQUAL spirv OR ARCH STREQUAL spirv64 ) set( build_flags -O0 -finline-hint-functions -DCLC_SPIRV ) set( opt_flags ) @@ -412,7 +413,6 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} ) else() set( build_flags ) set( opt_flags -O3 ) - set( MACRO_ARCH ${ARCH} ) endif() set( LIBCLC_ARCH_OBJFILE_DIR "${LIBCLC_OBJFILE_DIR}/${arch_suffix}" ) @@ -461,14 +461,12 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} ) -D__CLC_GENERIC_ADDRSPACE_VAL=${generic_addrspace_val} ) - set( clc_build_flags ${build_flags} -DCLC_INTERNAL ) - add_libclc_builtin_set( CLC_INTERNAL ARCH ${ARCH} ARCH_SUFFIX clc-${arch_suffix} TRIPLE ${clang_triple} - COMPILE_FLAGS ${clc_build_flags} + COMPILE_FLAGS ${build_flags} OPT_FLAGS ${opt_flags} LIB_FILES ${clc_lib_files} GEN_FILES ${clc_gen_files} diff --git a/libclc/clc/include/clc/float/definitions.h b/libclc/clc/include/clc/float/definitions.h index 9db49fa54d2e..93d2b5b391c5 100644 --- a/libclc/clc/include/clc/float/definitions.h +++ b/libclc/clc/include/clc/float/definitions.h @@ -70,10 +70,6 @@ #define M_SQRT2 0x1.6a09e667f3bcdp+0 #define M_SQRT1_2 0x1.6a09e667f3bcdp-1 -#ifdef __CLC_INTERNAL -#define M_LOG210 0x1.a934f0979a371p+1 -#endif - #endif #ifdef cl_khr_fp16 diff --git a/libclc/clc/include/clc/shared/unary_def_scalarize_loop.inc b/libclc/clc/include/clc/shared/unary_def_scalarize_loop.inc new file mode 100644 index 000000000000..544057b0e137 --- /dev/null +++ b/libclc/clc/include/clc/shared/unary_def_scalarize_loop.inc @@ -0,0 +1,28 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include <clc/utils.h> + +#if __CLC_VECSIZE_OR_1 >= 2 + +#ifndef __CLC_IMPL_FUNCTION +#define __CLC_IMPL_FUNCTION __CLC_FUNCTION +#endif + +_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x) { + union { + __CLC_GENTYPE vec; + __CLC_SCALAR_GENTYPE arr[__CLC_VECSIZE_OR_1]; + } u_x, u_result; + u_x.vec = x; + for (int i = 0; i < __CLC_VECSIZE_OR_1; ++i) + u_result.arr[i] = __CLC_IMPL_FUNCTION(u_x.arr[i]); + return u_result.vec; +} + +#endif // __CLC_VECSIZE_OR_1 >= 2 diff --git a/libclc/clc/include/clc/shared/unary_def_with_ptr_scalarize.inc b/libclc/clc/include/clc/shared/unary_def_with_ptr_scalarize.inc new file mode 100644 index 000000000000..fff91d36e626 --- /dev/null +++ b/libclc/clc/include/clc/shared/unary_def_with_ptr_scalarize.inc @@ -0,0 +1,106 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include <clc/utils.h> + +#ifdef __CLC_SCALAR + +#ifndef __CLC_IMPL_FUNCTION +#define __CLC_IMPL_FUNCTION __CLC_FUNCTION +#endif + +#ifndef __CLC_RET_TYPE +#define __CLC_RET_TYPE __CLC_GENTYPE +#endif + +#ifndef __CLC_ARG1_TYPE +#define __CLC_ARG1_TYPE __CLC_GENTYPE +#endif + +#ifndef __CLC_ARG2_TYPE +#define __CLC_ARG2_TYPE __CLC_GENTYPE +#endif + +#define __CLC_RET_VECTYPE __CLC_XCONCAT(__CLC_RET_TYPE, __CLC_VECTOR_SIZE) +#define __CLC_ARG1_VECTYPE __CLC_XCONCAT(__CLC_ARG1_TYPE, __CLC_VECTOR_SIZE) +#define __CLC_ARG2_VECTYPE __CLC_XCONCAT(__CLC_ARG2_TYPE, __CLC_VECTOR_SIZE) + +#define __CLC_VECTOR_SIZE 2 +_CLC_OVERLOAD _CLC_DEF __CLC_RET_VECTYPE +__CLC_FUNCTION(__CLC_ARG1_VECTYPE x, __CLC_ADDRSPACE __CLC_ARG2_VECTYPE *ptr) { + __CLC_ADDRSPACE __CLC_ARG2_TYPE *p = (__CLC_ADDRSPACE __CLC_ARG2_TYPE *)ptr; + + return (__CLC_RET_VECTYPE)(__CLC_IMPL_FUNCTION(x.s0, p), + __CLC_IMPL_FUNCTION(x.s1, p + 1)); +} +#undef __CLC_VECTOR_SIZE + +#define __CLC_VECTOR_SIZE 3 +_CLC_OVERLOAD _CLC_DEF __CLC_RET_VECTYPE +__CLC_FUNCTION(__CLC_ARG1_VECTYPE x, __CLC_ADDRSPACE __CLC_ARG2_VECTYPE *ptr) { + __CLC_ADDRSPACE __CLC_ARG2_TYPE *p = (__CLC_ADDRSPACE __CLC_ARG2_TYPE *)ptr; + return (__CLC_RET_VECTYPE)(__CLC_IMPL_FUNCTION(x.s0, p), + __CLC_IMPL_FUNCTION(x.s1, p + 1), + __CLC_IMPL_FUNCTION(x.s2, p + 2)); +} +#undef __CLC_VECTOR_SIZE + +#define __CLC_VECTOR_SIZE 4 +_CLC_OVERLOAD _CLC_DEF __CLC_RET_VECTYPE +__CLC_FUNCTION(__CLC_ARG1_VECTYPE x, __CLC_ADDRSPACE __CLC_ARG2_VECTYPE *ptr) { + __CLC_ADDRSPACE __CLC_ARG2_TYPE *p = (__CLC_ADDRSPACE __CLC_ARG2_TYPE *)ptr; + return (__CLC_RET_VECTYPE)(__CLC_IMPL_FUNCTION(x.s0, p), + __CLC_IMPL_FUNCTION(x.s1, p + 1), + __CLC_IMPL_FUNCTION(x.s2, p + 2), + __CLC_IMPL_FUNCTION(x.s3, p + 3)); +} +#undef __CLC_VECTOR_SIZE + +#define __CLC_VECTOR_SIZE 8 +_CLC_OVERLOAD _CLC_DEF __CLC_RET_VECTYPE +__CLC_FUNCTION(__CLC_ARG1_VECTYPE x, __CLC_ADDRSPACE __CLC_ARG2_VECTYPE *ptr) { + __CLC_ADDRSPACE __CLC_ARG2_TYPE *p = (__CLC_ADDRSPACE __CLC_ARG2_TYPE *)ptr; + return (__CLC_RET_VECTYPE)(__CLC_IMPL_FUNCTION(x.s0, p), + __CLC_IMPL_FUNCTION(x.s1, p + 1), + __CLC_IMPL_FUNCTION(x.s2, p + 2), + __CLC_IMPL_FUNCTION(x.s3, p + 3), + __CLC_IMPL_FUNCTION(x.s4, p + 4), + __CLC_IMPL_FUNCTION(x.s5, p + 5), + __CLC_IMPL_FUNCTION(x.s6, p + 6), + __CLC_IMPL_FUNCTION(x.s7, p + 7)); +} +#undef __CLC_VECTOR_SIZE + +#define __CLC_VECTOR_SIZE 16 +_CLC_OVERLOAD _CLC_DEF __CLC_RET_VECTYPE +__CLC_FUNCTION(__CLC_ARG1_VECTYPE x, __CLC_ADDRSPACE __CLC_ARG2_VECTYPE *ptr) { + __CLC_ADDRSPACE __CLC_ARG2_TYPE *p = (__CLC_ADDRSPACE __CLC_ARG2_TYPE *)ptr; + return (__CLC_RET_VECTYPE)(__CLC_IMPL_FUNCTION(x.s0, p), + __CLC_IMPL_FUNCTION(x.s1, p + 1), + __CLC_IMPL_FUNCTION(x.s2, p + 2), + __CLC_IMPL_FUNCTION(x.s3, p + 3), + __CLC_IMPL_FUNCTION(x.s4, p + 4), + __CLC_IMPL_FUNCTION(x.s5, p + 5), + __CLC_IMPL_FUNCTION(x.s6, p + 6), + __CLC_IMPL_FUNCTION(x.s7, p + 7), + __CLC_IMPL_FUNCTION(x.s8, p + 8), + __CLC_IMPL_FUNCTION(x.s9, p + 9), + __CLC_IMPL_FUNCTION(x.sa, p + 10), + __CLC_IMPL_FUNCTION(x.sb, p + 11), + __CLC_IMPL_FUNCTION(x.sc, p + 12), + __CLC_IMPL_FUNCTION(x.sd, p + 13), + __CLC_IMPL_FUNCTION(x.se, p + 14), + __CLC_IMPL_FUNCTION(x.sf, p + 15)); +} +#undef __CLC_VECTOR_SIZE + +#undef __CLC_RET_VECTYPE +#undef __CLC_ARG1_VECTYPE +#undef __CLC_ARG2_VECTYPE + +#endif // __CLC_SCALAR diff --git a/libclc/clc/lib/generic/math/clc_erf.cl b/libclc/clc/lib/generic/math/clc_erf.cl index 34c7d586131e..61a7c9d684aa 100644 --- a/libclc/clc/lib/generic/math/clc_erf.cl +++ b/libclc/clc/lib/generic/math/clc_erf.cl @@ -507,5 +507,5 @@ _CLC_OVERLOAD _CLC_DEF half __clc_erf(half x) { #endif #define __CLC_FUNCTION __clc_erf -#define __CLC_BODY <clc/shared/unary_def_scalarize.inc> +#define __CLC_BODY <clc/shared/unary_def_scalarize_loop.inc> #include <clc/math/gentype.inc> diff --git a/libclc/clc/lib/generic/math/clc_erfc.cl b/libclc/clc/lib/generic/math/clc_erfc.cl index 7922807818ea..01dbcd0c39ae 100644 --- a/libclc/clc/lib/generic/math/clc_erfc.cl +++ b/libclc/clc/lib/generic/math/clc_erfc.cl @@ -518,5 +518,5 @@ _CLC_OVERLOAD _CLC_DEF half __clc_erfc(half x) { #endif #define __CLC_FUNCTION __clc_erfc -#define __CLC_BODY <clc/shared/unary_def_scalarize.inc> +#define __CLC_BODY <clc/shared/unary_def_scalarize_loop.inc> #include <clc/math/gentype.inc> diff --git a/libclc/clc/lib/generic/math/clc_ldexp.cl b/libclc/clc/lib/generic/math/clc_ldexp.cl index 8b41751e4028..f9252a75ab4b 100644 --- a/libclc/clc/lib/generic/math/clc_ldexp.cl +++ b/libclc/clc/lib/generic/math/clc_ldexp.cl @@ -14,9 +14,7 @@ #include <clc/relational/clc_isnan.h> #include <clc/shared/clc_clamp.h> -#define _CLC_DEF_ldexp _CLC_DEF __attribute__((weak)) - -_CLC_DEF_ldexp _CLC_OVERLOAD float __clc_ldexp(float x, int n) { +_CLC_DEF _CLC_OVERLOAD float __clc_ldexp(float x, int n) { if (!__clc_fp32_subnormals_supported()) { // This treats subnormals as zeros @@ -89,7 +87,7 @@ _CLC_DEF_ldexp _CLC_OVERLOAD float __clc_ldexp(float x, int n) { #pragma OPENCL EXTENSION cl_khr_fp64 : enable -_CLC_DEF_ldexp _CLC_OVERLOAD double __clc_ldexp(double x, int n) { +_CLC_DEF _CLC_OVERLOAD double __clc_ldexp(double x, int n) { long l = __clc_as_ulong(x); int e = (l >> 52) & 0x7ff; long s = l & 0x8000000000000000; @@ -124,14 +122,13 @@ _CLC_DEF_ldexp _CLC_OVERLOAD double __clc_ldexp(double x, int n) { #pragma OPENCL EXTENSION cl_khr_fp16 : enable -_CLC_OVERLOAD _CLC_DEF_ldexp half __clc_ldexp(half x, int n) { +_CLC_OVERLOAD _CLC_DEF half __clc_ldexp(half x, int n) { return (half)__clc_ldexp((float)x, n); } #endif #define __CLC_FUNCTION __clc_ldexp -#define __CLC_DEF_SPEC _CLC_DEF_ldexp #define __CLC_ARG2_TYPE int #define __CLC_BODY <clc/shared/binary_def_scalarize.inc> #include <clc/math/gentype.inc> diff --git a/libclc/clc/lib/generic/math/clc_lgamma_r.cl b/libclc/clc/lib/generic/math/clc_lgamma_r.cl index 662b34a69bb7..2322ad54508f 100644 --- a/libclc/clc/lib/generic/math/clc_lgamma_r.cl +++ b/libclc/clc/lib/generic/math/clc_lgamma_r.cl @@ -16,60 +16,6 @@ #include <clc/math/clc_sinpi.h> #include <clc/math/math.h> -#define _CLC_V_V_VP_VECTORIZE(DECLSPEC, RET_TYPE, __CLC_FUNCTION, ARG1_TYPE, \ - ADDR_SPACE, ARG2_TYPE) \ - DECLSPEC __CLC_XCONCAT(RET_TYPE, 2) \ - __CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 2) x, \ - ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 2) * y) { \ - ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \ - return (__CLC_XCONCAT(RET_TYPE, 2))(__CLC_FUNCTION(x.s0, ptr), \ - __CLC_FUNCTION(x.s1, ptr + 1)); \ - } \ - \ - DECLSPEC __CLC_XCONCAT(RET_TYPE, 3) \ - __CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 3) x, \ - ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 3) * y) { \ - ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \ - return (__CLC_XCONCAT(RET_TYPE, 3))(__CLC_FUNCTION(x.s0, ptr), \ - __CLC_FUNCTION(x.s1, ptr + 1), \ - __CLC_FUNCTION(x.s2, ptr + 2)); \ - } \ - \ - DECLSPEC __CLC_XCONCAT(RET_TYPE, 4) \ - __CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 4) x, \ - ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 4) * y) { \ - ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \ - return (__CLC_XCONCAT(RET_TYPE, 4))( \ - __CLC_FUNCTION(x.s0, ptr), __CLC_FUNCTION(x.s1, ptr + 1), \ - __CLC_FUNCTION(x.s2, ptr + 2), __CLC_FUNCTION(x.s3, ptr + 3)); \ - } \ - \ - DECLSPEC __CLC_XCONCAT(RET_TYPE, 8) \ - __CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 8) x, \ - ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 8) * y) { \ - ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \ - return (__CLC_XCONCAT(RET_TYPE, 8))( \ - __CLC_FUNCTION(x.s0, ptr), __CLC_FUNCTION(x.s1, ptr + 1), \ - __CLC_FUNCTION(x.s2, ptr + 2), __CLC_FUNCTION(x.s3, ptr + 3), \ - __CLC_FUNCTION(x.s4, ptr + 4), __CLC_FUNCTION(x.s5, ptr + 5), \ - __CLC_FUNCTION(x.s6, ptr + 6), __CLC_FUNCTION(x.s7, ptr + 7)); \ - } \ - \ - DECLSPEC __CLC_XCONCAT(RET_TYPE, 16) \ - __CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 16) x, \ - ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 16) * y) { \ - ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \ - return (__CLC_XCONCAT(RET_TYPE, 16))( \ - __CLC_FUNCTION(x.s0, ptr), __CLC_FUNCTION(x.s1, ptr + 1), \ - __CLC_FUNCTION(x.s2, ptr + 2), __CLC_FUNCTION(x.s3, ptr + 3), \ - __CLC_FUNCTION(x.s4, ptr + 4), __CLC_FUNCTION(x.s5, ptr + 5), \ - __CLC_FUNCTION(x.s6, ptr + 6), __CLC_FUNCTION(x.s7, ptr + 7), \ - __CLC_FUNCTION(x.s8, ptr + 8), __CLC_FUNCTION(x.s9, ptr + 9), \ - __CLC_FUNCTION(x.sa, ptr + 10), __CLC_FUNCTION(x.sb, ptr + 11), \ - __CLC_FUNCTION(x.sc, ptr + 12), __CLC_FUNCTION(x.sd, ptr + 13), \ - __CLC_FUNCTION(x.se, ptr + 14), __CLC_FUNCTION(x.sf, ptr + 15)); \ - } - // ==================================================== // Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. // @@ -333,9 +279,6 @@ _CLC_OVERLOAD _CLC_DEF float __clc_lgamma_r(float x, private int *signp) { return r; } -_CLC_V_V_VP_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, float, __clc_lgamma_r, float, - private, int) - #ifdef cl_khr_fp64 #pragma OPENCL EXTENSION cl_khr_fp64 : enable // ==================================================== @@ -639,8 +582,6 @@ _CLC_OVERLOAD _CLC_DEF double __clc_lgamma_r(double x, private int *ip) { return r; } -_CLC_V_V_VP_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, double, __clc_lgamma_r, double, - private, int) #endif #ifdef cl_khr_fp16 @@ -651,11 +592,17 @@ _CLC_OVERLOAD _CLC_DEF half __clc_lgamma_r(half x, private int *iptr) { return (half)__clc_lgamma_r((float)x, iptr); } -_CLC_V_V_VP_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, half, __clc_lgamma_r, half, - private, int); - #endif +#define __CLC_FUNCTION __clc_lgamma_r +#define __CLC_ARG2_TYPE int +#define __CLC_ADDRSPACE private +#define __CLC_BODY <clc/shared/unary_def_with_ptr_scalarize.inc> +#include <clc/math/gentype.inc> +#undef __CLC_ADDRSPACE +#undef __CLC_ARG2_TYPE +#undef __CLC_FUNCTION + #define __CLC_ADDRSPACE global #define __CLC_BODY <clc_lgamma_r.inc> #include <clc/math/gentype.inc> diff --git a/libclc/clc/lib/generic/math/clc_rsqrt.inc b/libclc/clc/lib/generic/math/clc_rsqrt.inc index 4c04155a932c..07aad16f9191 100644 --- a/libclc/clc/lib/generic/math/clc_rsqrt.inc +++ b/libclc/clc/lib/generic/math/clc_rsqrt.inc @@ -6,8 +6,7 @@ // //===----------------------------------------------------------------------===// -__attribute__((weak)) _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE -__clc_rsqrt(__CLC_GENTYPE val) { +_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE __clc_rsqrt(__CLC_GENTYPE val) { #pragma clang fp contract(fast) return __CLC_FP_LIT(1.0) / __builtin_elementwise_sqrt(val); } diff --git a/libclc/clc/lib/generic/math/clc_sqrt.inc b/libclc/clc/lib/generic/math/clc_sqrt.inc index 61e341993f5c..e15dcf75ac3f 100644 --- a/libclc/clc/lib/generic/math/clc_sqrt.inc +++ b/libclc/clc/lib/generic/math/clc_sqrt.inc @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -__attribute__((weak)) _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE -__clc_sqrt(__CLC_GENTYPE val) { +_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE __clc_sqrt(__CLC_GENTYPE val) { return __builtin_elementwise_sqrt(val); } diff --git a/libclc/cmake/modules/AddLibclc.cmake b/libclc/cmake/modules/AddLibclc.cmake index 5cc202ddbaa8..aa8dd9859cd2 100644 --- a/libclc/cmake/modules/AddLibclc.cmake +++ b/libclc/cmake/modules/AddLibclc.cmake @@ -92,19 +92,35 @@ function(link_bc) ${ARGN} ) - set( LINK_INPUT_ARG ${ARG_INPUTS} ) + if( ARG_INTERNALIZE ) + set( inputs_with_flag ${ARG_INPUTS} ) + else() + # Add the --override flag for non-generic bitcode files so that their + # symbols can override definitions in generic bitcode files. + set( inputs_with_flag ) + foreach( file IN LISTS ARG_INPUTS ) + string( FIND ${file} "/generic/" is_generic ) + if( is_generic LESS 0 ) + list( APPEND inputs_with_flag "--override" ) + endif() + list( APPEND inputs_with_flag ${file} ) + endforeach() + endif() + if( WIN32 OR CYGWIN ) # Create a response file in case the number of inputs exceeds command-line # character limits on certain platforms. file( TO_CMAKE_PATH ${LIBCLC_ARCH_OBJFILE_DIR}/${ARG_TARGET}.rsp RSP_FILE ) # Turn it into a space-separate list of input files - list( JOIN ARG_INPUTS " " RSP_INPUT ) + list( JOIN inputs_with_flag " " RSP_INPUT ) file( GENERATE OUTPUT ${RSP_FILE} CONTENT ${RSP_INPUT} ) # Ensure that if this file is removed, we re-run CMake set_property( DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${RSP_FILE} ) set( LINK_INPUT_ARG "@${RSP_FILE}" ) + else() + set( LINK_INPUT_ARG ${inputs_with_flag} ) endif() if( ARG_INTERNALIZE ) |
