Skip to content

Commit

Permalink
Put include paths needed for HLL builds in config
Browse files Browse the repository at this point in the history
Currently the NQP and Rakudo builds use a hard-coded list, but this is
prep work for getting their builds to actually use data taken from the
MoarVM build they're using.
  • Loading branch information
MasterDuke17 committed Jun 15, 2021
1 parent 0a62f0c commit 9b7ab7c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Configure.pl
Expand Up @@ -222,6 +222,8 @@ sub uniq {
# Set the remaining ldmiscflags. Do this after probing for gcc -Werror probe to not miss that change for the linker.
$config{ldmiscflags} = $config{ccmiscflags} unless defined $config{ldmiscflags};

# Include paths that NQP/Rakudo are going to need in their build.
my @hllincludes = qw( moar );

if ($args{'has-sha'}) {
$config{shaincludedir} = '/usr/include/sha';
Expand Down Expand Up @@ -268,6 +270,7 @@ sub uniq {
. "\t\$(MKPATH) \"\$(DESTDIR)\$(PREFIX)/include/libuv/uv\"\n"
. "\t\$(CP) 3rdparty/libuv/include/*.h \"\$(DESTDIR)\$(PREFIX)/include/libuv\"\n"
. "\t\$(CP) 3rdparty/libuv/include/uv/*.h \"\$(DESTDIR)\$(PREFIX)/include/libuv/uv\"\n";
push @hllincludes, 'libuv';
}

if ($args{'has-libatomic_ops'}) {
Expand Down Expand Up @@ -297,6 +300,7 @@ sub uniq {
. "\t\$(CP) 3rdparty/libatomicops/src/atomic_ops/sysdeps/loadstore/*.h \"$lao/atomic_ops/sysdeps/loadstore\"\n"
. "\t\$(CP) 3rdparty/libatomicops/src/atomic_ops/sysdeps/msftc/*.h \"$lao/atomic_ops/sysdeps/msftc\"\n"
. "\t\$(CP) 3rdparty/libatomicops/src/atomic_ops/sysdeps/sunc/*.h \"$lao/atomic_ops/sysdeps/sunc\"\n";
push @hllincludes, 'libatomic_ops';
}

if ($args{'has-libtommath'}) {
Expand All @@ -315,6 +319,7 @@ sub uniq {
$config{moar_cincludes} .= ' ' . $defaults{ccinc} . '3rdparty/libtommath';
$config{install} .= "\t\$(MKPATH) \"\$(DESTDIR)\$(PREFIX)/include/libtommath\"\n"
. "\t\$(CP) 3rdparty/libtommath/*.h \"\$(DESTDIR)\$(PREFIX)/include/libtommath\"\n";
push @hllincludes, 'libtommath';
}

if ($args{'has-libffi'}) {
Expand Down Expand Up @@ -362,6 +367,7 @@ sub uniq {
. "\t\$(CP) 3rdparty/dyncall/dynload/*.h \"\$(DESTDIR)\$(PREFIX)/include/dyncall\"\n"
. "\t\$(CP) 3rdparty/dyncall/dyncall/*.h \"\$(DESTDIR)\$(PREFIX)/include/dyncall\"\n"
. "\t\$(CP) 3rdparty/dyncall/dyncallback/*.h \"\$(DESTDIR)\$(PREFIX)/include/dyncall\"\n";
push @hllincludes, 'dyncall';
}

# The ZSTD_CStream API is only exposed starting at version 1.0.0
Expand Down Expand Up @@ -592,6 +598,7 @@ sub uniq {
if ($config{cc} eq 'cl') {
$config{install} .= "\t\$(MKPATH) \"\$(DESTDIR)\$(PREFIX)/include/msinttypes\"\n"
. "\t\$(CP) 3rdparty/msinttypes/*.h \"\$(DESTDIR)\$(PREFIX)/include/msinttypes\"\n";
push @hllincludes, 'msinttypes';
}

if ($^O eq 'aix' && $config{ptr_size} == 4) {
Expand Down Expand Up @@ -686,6 +693,10 @@ sub uniq {

print "OK\n";

# the parser for config values used in the NQP/Rakudo build doesn't understand arrays,
# so just join into a single string
$config{hllincludes} = join " ", @hllincludes;

write_backend_config();

# dump 3rdparty libs we need to build
Expand Down

0 comments on commit 9b7ab7c

Please sign in to comment.