Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for build failure in cdacreader when EmitCompilerGeneratedFiles=true #101279

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

elinor-fung
Copy link
Member

@elinor-fung elinor-fung commented Apr 19, 2024

When we build cdacreader, we run the LinkNative target. This depends on Compile not Build, which means the BuildOnlySettings target that sets BuildingProject=true doesn't run. When EmitCompilerGeneratedFiles=true, this results in the generated output path not being created and the compiler erroring when trying to emit files to the path. See dotnet/roslyn#73075.

CodeQL injects -p:EmitCompilerGeneratedFiles=true into the command line arguments. This was resulting in build failures in jobs where CodeQL is run.

This change adds a workaround to our infrastructure for building NativeAOT-ed runtime components such that the generated output path is always created if EmitCompilerGeneratedFiles=true. Manually tested by explicitly passing that property on the command line.

Fixes dotnet/source-build#4335

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

@Boxter187

This comment was marked as spam.

@akoeplinger akoeplinger merged commit 5d38457 into dotnet:main Apr 19, 2024
144 of 152 checks passed
@shushanhf
Copy link
Contributor

shushanhf commented Apr 19, 2024

@elinor-fung

After this PR, there is an error during coreclr camke-config step by command

#### linux-debian-AMD64 and loongarch64 are both failed !!!
./build-runtime.sh -debug -loongarch64 -nopgooptimize -skipmanaged

-- Looking for process_vm_readv
-- Looking for process_vm_readv - found
CMake Error at debug/runtimeinfo/CMakeLists.txt:57 (message):
  No cdac-build-tool set or does not exist


-- Configuring incomplete, errors occurred!
See also "/home/qiao/work_qiao/runtime/artifacts/obj/coreclr/linux.loongarch64.Debug/CMakeFiles/CMakeOutput.log".
See also "/home/qiao/work_qiao/runtime/artifacts/obj/coreclr/linux.loongarch64.Debug/CMakeFiles/CMakeError.log".

#100650
This PR is not to fix the error #100650 (comment)

@elinor-fung
Copy link
Member Author

@shushanhf This PR is fixing a different problem (from before #100650 went in) and is unrelated to that error. @lambdageek's change in #101297 should be addressing that one.

@elinor-fung elinor-fung deleted the cdacreaderBuild-workaround branch April 19, 2024 15:25
matouskozak pushed a commit to matouskozak/runtime that referenced this pull request Apr 30, 2024
…tnet#101279)

When we build `cdacreader`, we run the `LinkNative` target. This depends on `Compile` not `Build`, which means the `BuildOnlySettings` target that sets `BuildingProject=true` doesn't run. When `EmitCompilerGeneratedFiles=true`, this results in the generated output path not being created and the compiler erroring when trying to emit files to the path. See dotnet/roslyn#73075.

CodeQL injects `-p:EmitCompilerGeneratedFiles=true` into the command line arguments. This was resulting in build failures in jobs where CodeQL is run.

This change adds a workaround to our infrastructure for building NativeAOT-ed runtime components such that the generated output path is always created if `EmitCompilerGeneratedFiles=true`. Manually tested by explicitly passing that property on the command line.

Fixes dotnet/source-build#4335
@github-actions github-actions bot locked and limited conversation to collaborators May 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Runtime windows verticals failing to build in the VMR
5 participants