Closed zmughal closed 2 years ago
As discussed in IRC #native
, this is how PDL's CI workflow monkey-patches Config.pm to using Clang with perl
s where $Config{cc}
is GCC: https://github.com/PDLPorters/pdl/blob/2.046/.github/workflows/ci.yml#L104-L111:
- name: Use clang?
# clang is already installed in Travis-CI environment. Using PERL_MM_OPT does not work with subdirectory Makefile.PLs so we override Config.pm
# Also, both $Config{cc} and $Config{ld} need to be set because under ELF environments (such as Travis-CI's Ubuntu), this is what Perl's Config.pm does.
if: matrix.use-clang
run: |
mkdir build_aux
echo 'package pdl_config_override; use ExtUtils::MakeMaker::Config; $Config{cc} = $Config{ld} = "clang"; 1;' >> build_aux/pdl_config_override.pm
echo "PERL5OPT=-I$(pwd)/build_aux -Mpdl_config_override" >> $GITHUB_ENV
Yeah I've been thinking about that, may #9 supercedes this one? If so, go ahead and close this one. I'll comment on #9.
Perhaps this can help with adding/testing Intel compiler support https://github.com/oneapi-src/oneapi-ci?