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

Extract detecting CC/CXX into helper script so we can use it from mono.proj #31854

Merged
merged 3 commits into from
Feb 7, 2020

Conversation

akoeplinger
Copy link
Member

Also fixed a small typo in the detection script, see first commit.

Closes #31771

@am11
Copy link
Member

am11 commented Feb 6, 2020

Sorry about that typo, I happened to stumble upon that condition today on different platform and fixed in #31865 😄 (will revert from there).
+1 for reusing the code.

eng/native/detect-compiler.sh Outdated Show resolved Hide resolved
@davidwrighton
Copy link
Member

@akoeplinger This works. It fixes the issue I hit nicely. I'm going to close my PR as this supersedes it.

@akoeplinger akoeplinger merged commit f26a1ca into dotnet:master Feb 7, 2020
@akoeplinger akoeplinger deleted the fix-mono-clang branch February 7, 2020 10:01
</PropertyGroup>

<Message Text="Configuring Mono with '$(_MonoConfigureParams)'" Importance="High" />
<MakeDir Directories="$(MonoObjDir)" />
<Exec Command="NOCONFIGURE=1 $(MonoProjectRoot)autogen.sh" />
<Exec Command="$(MonoProjectRoot)configure $(_MonoConfigureParams)" WorkingDirectory="$(MonoObjDir)" />
<Exec Command="bash -c 'source $(RepositoryEngineeringDir)native/init-compiler.sh $(Platform) clang &amp;&amp; $(MonoProjectRoot)configure $(_MonoConfigureParams)'" WorkingDirectory="$(MonoObjDir)" />
Copy link
Member

Choose a reason for hiding this comment

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

@akoeplinger, would it be possible to let eng/build.sh determine which compiler to use? i.e. the hardcoded clang to be replaced by $(Compiler) defined here:

runtime/eng/build.sh

Lines 275 to 292 in 2ef008e

-clang*)
arguments="$arguments /p:Compiler=$opt"
shift 1
;;
-cmakeargs)
if [ -z ${2+x} ]; then
echo "No cmake args supplied." 1>&2
exit 1
fi
cmakeargs="${cmakeargs} ${opt} $2"
shift 2
;;
-gcc*)
arguments="$arguments /p:Compiler=$opt"
shift 1
;;

Doing that will help systems which require gcc build (runtime/build.sh -gcc ...).

Copy link
Member Author

Choose a reason for hiding this comment

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

@am11 sure, that would be great!

@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
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.

4 participants