Commit Graph

12 Commits

Author SHA1 Message Date
Artem Chikin
a47bf3641a [Dependency Scanning] Construct a hollow output on query failure to carry diagnostic output 2024-07-10 12:46:54 -07:00
Steven Wu
47598bbe8f [ScanDependency] Respect working directory set inside invocation
Teach scanner to respect the working directory set in the invocation
through scanner C API.

Also add test infrastructure to testing scanner from C API. Break up
DependencyScan lib into two so the swift-scan-test and remain small
without understanding swift AST.

rdar://127626011
2024-05-22 11:04:45 -07:00
Artem Chikin
d2a8e32bc5 [Dependency Scanning] Collect emitted diagnostics per-scan-query 2024-02-27 14:51:54 -08:00
Allan Shortlidge
35fd79af57 NFC: Import llvm/TargetParser/Host.h instead of llvm/Support/Host.h. 2024-01-16 13:27:54 -08:00
Evan Wilde
41d59b215a Update Triple.h location
Triple moved from ADT to TargetParser. Updating includes to reflect
that.
2023-07-17 10:53:42 -07:00
Artem Chikin
60806ef64d [Dependency Scanning] Consider scanned module name a part of the scanning context (hash)
As well as a couple of additional frontend options that seem like they may impact scanning result.

Resolves rdar://108464467
2023-04-25 11:05:16 -07:00
Artem Chikin
baec3154a0 [Dependency Scan] Remove redundant recombination of arguments in 'initCompilerInstanceForScan' into a string, before being re-parsed.
This does not seem to serve a purpose other than corrupting arguments with whitespaces - they get merged into one large string where the whitespace boundary between arguments and whitespaces within arguments are blurred.

Part of rdar://98985453
2022-08-22 16:12:58 -07:00
Artem Chikin
0bfff6beb6 Add libSwiftScan entry-points to query supported compiler flags and compiler features
For the client library (`libSwiftDriver`), this is critical for multiplexing library instances, and for compatibility with different versions of `libSwiftDrvier`.

Resolves rdar://73631930
2021-02-10 10:46:07 -08:00
Artem Chikin
4eae21c563 Change file generation in the DependencyScan.ModuleDeps unittest to hopefully work better on windows. 2021-01-07 16:53:23 -08:00
Artem Chikin
41a09a4092 [Dependency Scanning] Establish object ownership convention by using a Foundation-style ownership signals naming scheme across the API surface.
Foundation-style ownership signals documentation:
https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-CJBEJBHH
2021-01-07 09:08:21 -08:00
Artem Chikin
d1cc689c01 [Dependency Scanning] Fix the DependencyScan unit test harness to reflect C API changes. 2021-01-07 09:08:21 -08:00
Artem Chikin
75a8cfa048 [Dependency Scanning] Add a C API layer for dependency scanning tool, scanning actions, and scan results.
Adds a C API layer consisting of:
- Data structures used to represent in-memory result of dependency scanning
- Opaque dependency scanner tool (C wrapper for `DependencyScanningTool`)

Refactors `ScanDependencies.cpp` to produce dependency scanning result in the form of the above binary format.
2021-01-07 09:08:20 -08:00