Skip to content

Commit 6df6591

Browse files
committed
Merge from 'master' to 'sycl-web' (#1)
2 parents 3216f51 + a58b62b commit 6df6591

File tree

362 files changed

+9367
-8856
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

362 files changed

+9367
-8856
lines changed

clang/cmake/modules/AddClang.cmake

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -99,38 +99,40 @@ macro(add_clang_library name)
9999
endif()
100100
llvm_add_library(${name} ${LIBTYPE} ${ARG_UNPARSED_ARGUMENTS} ${srcs})
101101

102-
if(TARGET ${name})
103-
target_link_libraries(${name} INTERFACE ${LLVM_COMMON_LIBS})
104-
105-
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ARG_INSTALL_WITH_TOOLCHAIN)
106-
set(export_to_clangtargets)
107-
if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
108-
"clang-libraries" IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
109-
NOT LLVM_DISTRIBUTION_COMPONENTS)
110-
set(export_to_clangtargets EXPORT ClangTargets)
111-
set_property(GLOBAL PROPERTY CLANG_HAS_EXPORTS True)
102+
foreach(lib ${name} ${name}_static)
103+
if(TARGET ${lib})
104+
target_link_libraries(${lib} INTERFACE ${LLVM_COMMON_LIBS})
105+
106+
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ARG_INSTALL_WITH_TOOLCHAIN)
107+
set(export_to_clangtargets)
108+
if(${lib} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
109+
"clang-libraries" IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
110+
NOT LLVM_DISTRIBUTION_COMPONENTS)
111+
set(export_to_clangtargets EXPORT ClangTargets)
112+
set_property(GLOBAL PROPERTY CLANG_HAS_EXPORTS True)
113+
endif()
114+
115+
install(TARGETS ${lib}
116+
COMPONENT ${lib}
117+
${export_to_clangtargets}
118+
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
119+
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
120+
RUNTIME DESTINATION bin)
121+
122+
if (NOT LLVM_ENABLE_IDE)
123+
add_llvm_install_targets(install-${lib}
124+
DEPENDS ${lib}
125+
COMPONENT ${lib})
126+
endif()
127+
128+
set_property(GLOBAL APPEND PROPERTY CLANG_LIBS ${lib})
112129
endif()
113-
114-
install(TARGETS ${name}
115-
COMPONENT ${name}
116-
${export_to_clangtargets}
117-
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
118-
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
119-
RUNTIME DESTINATION bin)
120-
121-
if (NOT LLVM_ENABLE_IDE)
122-
add_llvm_install_targets(install-${name}
123-
DEPENDS ${name}
124-
COMPONENT ${name})
125-
endif()
126-
127-
set_property(GLOBAL APPEND PROPERTY CLANG_LIBS ${name})
130+
set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${lib})
131+
else()
132+
# Add empty "phony" target
133+
add_custom_target(${lib})
128134
endif()
129-
set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name})
130-
else()
131-
# Add empty "phony" target
132-
add_custom_target(${name})
133-
endif()
135+
endforeach()
134136

135137
set_target_properties(${name} PROPERTIES FOLDER "Clang libraries")
136138
set_clang_windows_version_resource_properties(${name})

clang/docs/DataFlowSanitizer.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@ How to build libc++ with DFSan
2424
==============================
2525

2626
DFSan requires either all of your code to be instrumented or for uninstrumented
27-
functions to be listed as``uninstrumented`` in the `ABI list`_.
27+
functions to be listed as ``uninstrumented`` in the `ABI list`_.
2828

2929
If you'd like to have instrumented libc++ functions, then you need to build it
3030
with DFSan instrumentation from source. Here is an example of how to build
3131
libc++ and the libc++ ABI with data flow sanitizer instrumentation.
3232

3333
.. code-block:: console
34+
3435
cd libcxx-build
3536
3637
# An example using ninja

clang/docs/LanguageExtensions.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Clang Language Extensions
1313
BlockLanguageSpec
1414
Block-ABI-Apple
1515
AutomaticReferenceCounting
16+
MatrixTypes
1617

1718
Introduction
1819
============
@@ -492,6 +493,24 @@ See also :ref:`langext-__builtin_shufflevector`, :ref:`langext-__builtin_convert
492493
'select', they operate somewhat differently. OpenCL selects based on signedness of
493494
the condition operands, but GCC vectors use normal bool conversions (that is, != 0).
494495
496+
Matrix Types
497+
============
498+
499+
Clang provides an extension for matrix types, which is currently being
500+
implemented. See :ref:`the draft specification <matrixtypes>` for more details.
501+
502+
For example, the code below uses the matrix types extension to multiply two 4x4
503+
float matrices and add the result to a third 4x4 matrix.
504+
505+
.. code-block:: c++
506+
507+
typedef float m4x4_t __attribute__((matrix_type(4, 4)));
508+
509+
m4x4_t f(m4x4_t a, m4x4_t b, m4x4_t c) {
510+
return a + b * c;
511+
}
512+
513+
495514
Half-Precision Floating Point
496515
=============================
497516

0 commit comments

Comments
 (0)