mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
While the (removed) comment is correct and the frontend can be called in different modes, both `swift build` and `xcodebuild` always use `-primary-files` when compiling Swift projects. The other mode was present only within our test runner (`qltest.sh`), so removing it and doing what the official build systems do simplifies our code base. Additionally, file archival is now a separate function/operation.
12 lines
393 B
Bash
Executable File
12 lines
393 B
Bash
Executable File
#!/bin/bash
|
|
|
|
mkdir -p "$CODEQL_EXTRACTOR_SWIFT_TRAP_DIR"
|
|
|
|
QLTEST_LOG="$CODEQL_EXTRACTOR_SWIFT_LOG_DIR"/qltest.log
|
|
|
|
export LD_LIBRARY_PATH="$CODEQL_EXTRACTOR_SWIFT_ROOT/tools/$CODEQL_PLATFORM"
|
|
|
|
for src in *.swift; do
|
|
"$CODEQL_EXTRACTOR_SWIFT_ROOT/tools/$CODEQL_PLATFORM/extractor" -sdk "$CODEQL_EXTRACTOR_SWIFT_ROOT/qltest/$CODEQL_PLATFORM/sdk" -c -primary-file $src >> $QLTEST_LOG 2>&1
|
|
done
|