Skip to content

Conversation

@Bigcheese
Copy link

While the source code isn't supposed to change during a build, in some environments it does. This adds an option that disables caching of stat failures, meaning that source files can be added to the build during scanning.

This adds a -no-cache-negative-stats option to clang-scan-deps to enable this behavior. There are no tests for clang-scan-deps as there's no reliable way to do so from it. A unit test has been added that modifies the filesystem between scans to test it.

Internally this uses an environment variable.

CLANG_SCAN_CACHE_NEGATIVE_STATS: If this is set or set to 1 negative stat caching is enabled. If it's 0 then it's disabled.

Negative stat caching is disabled by default.

(cherry picked from commit 588b6b1)

While the source code isn't supposed to change during a build, in some
environments it does. This adds an option that disables caching of
stat failures, meaning that source files can be added to the build
during scanning.

This adds a `-no-cache-negative-stats` option to clang-scan-deps to
enable this behavior. There are no tests for clang-scan-deps as
there's no reliable way to do so from it. A unit test has been added
that modifies the filesystem between scans to test it.

Internally this uses an environment variable.

`CLANG_SCAN_CACHE_NEGATIVE_STATS`: If this is set or set to 1 negative
stat caching is enabled. If it's 0 then it's disabled.

Negative stat caching is disabled by default.

(cherry picked from commit 588b6b1)
@Bigcheese
Copy link
Author

@swift-ci please test

@Bigcheese
Copy link
Author

@swift-ci please test llvm

@Bigcheese
Copy link
Author

@swift-ci please test windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants