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

Don't output stdout from lld check in init-compiler.sh #8221

Merged
merged 2 commits into from
Nov 26, 2021

Conversation

akoeplinger
Copy link
Member

@akoeplinger akoeplinger commented Nov 26, 2021

Another fallout from #8189 / #8219.

This caused an issue in dotnet/runtime#61668 because https://github.com/dotnet/runtime/blob/c00b06826ca4d333ef69d51e523ef7bd309b8631/src/libraries/System.Runtime.InteropServices/tests/TestAssets/NativeExports/NativeExports.csproj#L33 sources the init-compiler.sh and uses the stdout from it and we were outputting the stdout of the lld check which broke this.

Before:

# bash -c 'source "eng/common/native/init-compiler.sh" "eng/common/native/" x64 clang && echo $CC'
LLD 10.0.1 (compatible with GNU linkers)
/usr/bin/clang-10

After:

# bash -c 'source "eng/common/native/init-compiler.sh" "eng/common/native/" x64 clang && echo $CC'
/usr/bin/clang-10

This caused an issue in dotnet/runtime#61668 because https://github.com/dotnet/runtime/blob/c00b06826ca4d333ef69d51e523ef7bd309b8631/src/libraries/System.Runtime.InteropServices/tests/TestAssets/NativeExports/NativeExports.csproj#L33 sources the init-compiler.sh and uses the stdout from it and we were outputting the stdout of the lld check which broke this.

Before:

```
# bash -c 'source "eng/common/native/init-compiler.sh" "eng/common/native/" x64 clang && echo $CC'
LLD 10.0.1 (compatible with GNU linkers)
/usr/bin/clang-10
```

After:

```
# bash -c 'source "eng/common/native/init-compiler.sh" "eng/common/native/" x64 clang && echo $CC'
/usr/bin/clang-10
```
@omajid
Copy link
Member

omajid commented Nov 26, 2021

FYI @janvorli @am11

Copy link
Member

@omajid omajid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@janvorli
Copy link
Member

It seems that we should then explicitly mention in this scripts comments that the contract is that this script doesn't write anything to stdout. It is quite unexpected to me.

@akoeplinger
Copy link
Member Author

@janvorli added a note

@am11
Copy link
Member

am11 commented Nov 26, 2021

Typical workflow is to modify files in runtime/eng/common, test it there and then issue PR in arcade (and optionally runtime if it's urgent and can't wait for arcade update). @akoeplinger, feel free to push that change to the runtime PR to unblock it, as the next sync will copy these files without a conflict.

@janvorli, agree that it's unexpected, e.g. in src/native/libs/build.sh, we treat pipeline failures as errors but not in coreclr/build-runtime.sh. We should use the same semantics repo-wide, so if it works for one component, it works everywhere alike. These disparities are not useful.

@akoeplinger
Copy link
Member Author

@am11 we'll need another arcade bump anyway to fix another regression in Microsoft.DotNet.XunitExtensions (I'm preparing a PR right now).

@premun premun merged commit 6b74f9e into dotnet:main Nov 26, 2021
@akoeplinger akoeplinger deleted the fix-lld branch November 26, 2021 19:08
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.

5 participants