Commit Graph

17 Commits

Author SHA1 Message Date
Michael Gottesman
06cb5c0047 [cmake] Move a bunch of test binaries from install component 'tools' -> 'testsuite-tools'.
All of these are tools that are only meant to be used when testing swift. Thus
it doesn't make sense to include them in the catch all 'tools' install component
that distributions use to build all the tools.

I verified that all of the mac/linux presets in tree that have tools also has
testsuite-tools so this should be NFC. On Windows, I needed to add
testsuite-tools to build-windows.bat so should be NFC there as well.
2021-11-09 12:51:58 -08:00
swift-ci
37bd8b5131 Merge remote-tracking branch 'origin/main' into rebranch 2021-09-12 20:13:39 -07:00
Argyrios Kyrtzidis
c3b7f94911 [CMake/swift-syntax-parser-test] Use proper case for specifying support link component 2021-09-12 16:59:21 -07:00
Evan Wilde
29509d16ed Add Format.h to swift-syntax-parser-test
Something happened so that's not being transitively included. Adding it
in explicitly.
2021-07-08 17:07:57 -07:00
Alex Hoppen
a48713717e [libSyntax] Store range in token_data in C lib parse actions
We don't actually need the range for layout nodes, so just store it
for token nodes. This will also make deferred node handling easier
later on, because we don't need to keep track of layout node ranges.
2021-03-08 18:40:42 +01:00
Alex Hoppen
dd9e831ba7 [libSyntax] Explicitly pass source file length to c parse actions
Previously, the passed in source file was implicitly terminated by the
first null character. The source file might, however, contain a null
character in the middle and we shouldn't stop parsing at it.
2021-03-04 22:20:11 +01:00
Dario Rexin
fe461e1012 Don't build swift-syntax-parser-test with install rpath
This causes it not to find `libBlocksRuntime.so` when running the tests
2020-04-15 14:44:45 -07:00
Saleem Abdulrasool
8e80abf4a3 swift-syntax-parser-tool: tweak the build rules
Adjust the build rules to add a build RPATH into the executable to
ensure that `lib_InternalSwiftSyntaxParser.so` is properly found when
running the tests.  This also should ensure that we always use the
correct version, irrespective of the setting of `LD_LIBRARY_PATH`.  This
RPATH is marked as a `BUILD_RPATH` and will be stripped if the tool is
installed.

Adjust the dependencies to be clearer using generator expressions and
use the `target_compile_options` rather than the more fragile
`set_target_properties` to add `-fblocks` to the compilation.  This is
now possible as we are ensured that we are using CMake 3.15+.
2020-03-13 22:38:05 +00:00
Saleem Abdulrasool
729ad36b80 build: delegate rpath handling to CMake
This moves the rpath handling to the build system rather than trying to
figure out the correct flags to pass to the driver.
2020-01-25 17:01:07 -08:00
Saleem Abdulrasool
1d5947b3bd build: remove SWIFT_NEEDS_EXPLICIT_LIBDISPATCH
Restore the previous commit which somehow passed the buildbot given a
missing condition on the sub-configure for libdispatch.  This makes it
more explicit as to what the desire is; the variable was being used to
serve as a proxy for whether the build is not on a Darwin target.
2019-11-20 08:27:30 -08:00
David Zarzycki
475f7c1e63 Revert "build: remove SWIFT_NEED_EXPLICIT_LIBDISPATCH (NFC)"
This reverts commit 18570c723f because it
breaks building on platforms that do not want or need libdispatch.
2019-11-20 08:14:03 +02:00
Saleem Abdulrasool
18570c723f build: remove SWIFT_NEED_EXPLICIT_LIBDISPATCH (NFC)
This flag was being used as an alias for whether or not the host is
non-Darwin.  Rather than adding custom checks for this, use the explicit
check that CMake supports.  This simplifies the logic and avoids the
proliferation of custom variables which can become confusing for others
who are not familiar with the custom build infrastructure.
2019-11-19 08:24:53 -08:00
Saleem Abdulrasool
2dbb7fae96 build: add a dependency on the just built clang (NFC)
When building in a unified build and building the host tools with a
non-clang compiler, we switch compilers.  In such a case, we need to
actually add an explicit dependency on the new compiler.
2019-10-26 17:17:41 -07:00
Saleem Abdulrasool
218b37e1bb build: rename LLVM_COMPONENT_DEPENDS
This is not a target dependency but a target link.  Name the parameter
to be less misleading.  This also makes the name identical to the LLVM
parameter.
2019-05-04 19:58:28 -07:00
Saleem Abdulrasool
61c5064c5f build: use clang/clang-cl to build SwiftSyntaxParser
This allows us to build SwiftSyntaxParser even if we are building with a
different compiler (i.e. cl).
2019-03-27 15:06:00 -07:00
Xi Ge
a86f89da48 SwiftSyntax Parser: expose parser diagnostics via C API.
This allows SwiftSyntax to listen to emitted diagnostics during
parsing.

rdar://48439271
2019-03-01 15:22:21 -08:00
Argyrios Kyrtzidis
1dc288fb23 Introduce C parser library
Add a shared library with a C API that provides access to the syntactic parser with callbacks for the inference of raw syntax nodes.
This is primarily intended to be used by SwiftSyntax to speed-up source code parsing for it.
2019-01-09 18:30:45 -08:00