Skip to content

Commit

Permalink
Deduplicate build options.
Browse files Browse the repository at this point in the history
  • Loading branch information
PatZim committed Mar 27, 2019
1 parent 5bc6269 commit db5becf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Configure.pl
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,13 @@ ($$)
$errors{moar}{'no gen-nqp'} = @errors && !defined $options{'gen-nqp'};

# Strip rpath from ldflags so we can set it differently ourself.
$config{ldflags} = join(' ', $nqp_config{'moar::ldflags'}, $nqp_config{'moar::ldmiscflags'}, $nqp_config{'moar::ldoptiflags'}, $nqp_config{'moar::ldlibs'});
$config{ldflags} = $nqp_config{'moar::ldflags'};
$config{ldflags} =~ s/\Q$nqp_config{'moar::ldrpath'}\E ?//;
$config{ldflags} =~ s/\Q$nqp_config{'moar::ldrpath_relocatable'}\E ?//;
$config{ldflags} .= ' ' . ($options{'no-relocatable'} ? $nqp_config{'moar::ldrpath'} : $nqp_config{'moar::ldrpath_relocatable'});

$config{ldlibs} = $nqp_config{'moar::ldlibs'};

my @c_runner_libs;

if ($win) {
Expand Down
7 changes: 4 additions & 3 deletions tools/build/Makefile-Moar.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
M_CC = @moar::cc@
M_LD = @moar::ld@
M_CCINC = @moar::ccinc@
M_CFLAGS = @moar::cflags@ @moar::ccmiscflags@ @moar::ccoptiflags@ @moar::ccwarnflags@
M_CCINC = @moar::ccinc@
M_CFLAGS = @moar::cflags@
M_LDFLAGS = @ldflags@
M_LDLIBS = @moar::ldlibs@
M_C_RUNNER_LIBS = @c_runner_libs@
M_MINGW_UNICODE = @mingw_unicode@

Expand Down Expand Up @@ -122,7 +123,7 @@ $(M_PERL6_OPS_DLL): $(M_PERL6_OPS_SRC) $(M_PERL6_CONT_SRC)
-I$(M_INCPATH)/dyncall -I$(M_INCPATH)/moar \
-I$(M_INCPATH)/sha1 -I$(M_INCPATH)/tinymt -I$(M_INCPATH)/libtommath \
-I$(M_INCPATH)/libuv -I$(M_INCPATH) @moar::cincludes@ @moar::ccout@$(M_PERL6_CONT_OBJ) $(M_PERL6_CONT_SRC)
$(M_LD) @moar::ldswitch@ -L@moar::libdir@ @moar::ldshared@ $(M_LDFLAGS) @moar::ldout@$(M_PERL6_OPS_DLL) $(M_PERL6_OPS_OBJ) $(M_PERL6_CONT_OBJ) -lmoar @moarimplib@
$(M_LD) @moar::ldswitch@ -L@moar::libdir@ @moar::ldshared@ $(M_LDFLAGS) $(M_LDLIBS) @moar::ldout@$(M_PERL6_OPS_DLL) $(M_PERL6_OPS_OBJ) $(M_PERL6_CONT_OBJ) -lmoar @moarimplib@

$(PERL6_ML_MOAR): src/Perl6/ModuleLoader.nqp src/vm/moar/ModuleLoaderVMConfig.nqp gen/nqp-version
$(M_NQP) $(M_GEN_CAT) src/vm/moar/ModuleLoaderVMConfig.nqp src/Perl6/ModuleLoader.nqp > $(M_BUILD_DIR)/ModuleLoader.nqp
Expand Down

0 comments on commit db5becf

Please sign in to comment.