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

Can coreclr compile their code with debuginfod? #1924

Open
simplejackcoder opened this issue Jan 19, 2020 · 4 comments
Open

Can coreclr compile their code with debuginfod? #1924

simplejackcoder opened this issue Jan 19, 2020 · 4 comments
Labels
area-Infrastructure-coreclr question Answer questions and provide assistance, not an issue with source code or documentation.
Milestone

Comments

@simplejackcoder
Copy link
Contributor

debuginfod is the symbol server equivalent for elf/dbg files.

Seems like requires gcc. another reason why Coreclr should be compilable with gcc.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Jan 19, 2020
@am11
Copy link
Member

am11 commented Jan 19, 2020

Aside: src/coreclr, and src/libraries (and soon src/installer: #1753) do compile with gcc, in addition to clang:

if [ "$compiler" = "clang" ]; then versions=( 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 )
elif [ "$compiler" = "gcc" ]; then versions=( 9 8 7 6 5 4.9 ); fi

@simplejackcoder
Copy link
Contributor Author

That is good news. Is this a new change? If it possible can we compare benchmark? I feel GCC is what dotnet should use to ship binary since gcc in my experience generates more efficient and icache friendly code.

@am11
Copy link
Member

am11 commented Jan 19, 2020

it is relatively new: the support was added around v3.0 release to bring up coreclr on more platforms like smartos (solaris based); where llvm toolchain is not readily available (e.g. lldb is still not available on pkgsrc for smartos).

some caveats:

  1. currently, top level :/build.sh, :/coreclr.sh, :/libraries.sh and :/installer.sh do not accept compiler arguments -gcc and it defaults to -clang, so we invoke internal scripts individually: :/src/coreclr/build.sh -gcc, :/src/installer/corehost/build.sh -gcc, :/src/libraries/Native/build-native.sh -gcc. Or set environment variables, e.g.
    CLR_CC=$(command -v gcc) CLR_CXX=$(command -v g++) ./coreclr.sh (or gcc for cxx on centos).

  2. gcc 9.0 has become more stricter towards memaccess usages for non-trivial types, which is being slowly fixed. meanwhile, we can bypass the warning using this suppression:

src/coreclr/build.sh -gcc -cmakeargs -DCMAKE_CXX_FLAGS=-Wno-class-memaccess

@am11
Copy link
Member

am11 commented Jan 31, 2020

update: we can now pass various arguments from top-level scripts for native compilation:

cd runtime

# compile coreclr, installer and libraries using gcc 7
./build.sh --gcc7 --cmakeargs -DFeatureX=1 -cmakeargs -DFeatureY=0

# compile only coreclr using clang
./build.sh --subsetCategory coreclr --clang --cmakeargs -DFeatureX=1 -cmakeargs -DFeatureY=0

@ViktorHofer ViktorHofer added area-Infrastructure-coreclr question Answer questions and provide assistance, not an issue with source code or documentation. and removed area-Infrastructure untriaged New issue has not been triaged by the area owner labels Jul 12, 2020
@ViktorHofer ViktorHofer added this to the Future milestone Jul 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Infrastructure-coreclr question Answer questions and provide assistance, not an issue with source code or documentation.
Projects
Status: No status
Development

No branches or pull requests

5 participants