clang: Set -DLLVM_APPEND_VC_REV=OFF #993
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes Issue #991
If this is not disabled, the build tries to use CMake magic to compute repository and sha1 its building, however in case of OE it gets it completely wrong when building from tarball, because its building under TMPDIR which maybe a directory under main repo checkout e.g. poky tree so it traverses up and finds the sha of poky and assumes that its building from a git tree instead of tarball and emits the version control info into clang -v output e.g.
❯ ../image/mnt/b/yoe/master/build/tmp/work/x86_64-linux/clang-native/20.0.0/recipe-sysroot-native/usr/bin/clang -v clang version 20.0.0 (/home/kraj/work/llvm-project f133c59b33a749dc6d5fa8fb9a2366b95ea45068)
This can contain buildpaths since work-shared is where llvm sources will be and they will appear here.
Therefore, avoid cmake trying to do this and we get good clean version info
This will also avoid emitting buildpaths into debuginfo in some cases where compiler version is emitted into build.id info
Contributor checklist
Signed-off-by
is presentReviewer Guidelines