mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 11:06:20 +00:00
Fix regression in port_compiler needs_link check
This commit is contained in:
parent
ebb2345071
commit
b48cc0c7eb
1 changed files with 12 additions and 6 deletions
|
@ -115,11 +115,11 @@ compile(Config, AppFile) ->
|
||||||
%% Only relink if necessary, given the Target
|
%% Only relink if necessary, given the Target
|
||||||
%% and list of new binaries
|
%% and list of new binaries
|
||||||
lists:foreach(
|
lists:foreach(
|
||||||
fun({Target, Sources}) ->
|
fun({Target, Bins}) ->
|
||||||
Bins = lists:map(fun source_to_bin/1, Sources),
|
|
||||||
AllBins = [sets:from_list(Bins),
|
AllBins = [sets:from_list(Bins),
|
||||||
sets:from_list(NewBins)],
|
sets:from_list(NewBins)],
|
||||||
Intersection = sets:intersection(AllBins),
|
Intersection = sets:intersection(AllBins),
|
||||||
|
?DEBUG("Bins: ~p NewBins: ~p~n", [Bins, NewBins]),
|
||||||
case needs_link(Target, sets:to_list(Intersection)) of
|
case needs_link(Target, sets:to_list(Intersection)) of
|
||||||
true ->
|
true ->
|
||||||
LinkTemplate = select_link_template(Target),
|
LinkTemplate = select_link_template(Target),
|
||||||
|
@ -559,14 +559,20 @@ make_port_specs(Config, AppFile, Bins) ->
|
||||||
true
|
true
|
||||||
end, PortSpecs),
|
end, PortSpecs),
|
||||||
%% TODO: DEPRECATED: remove support for non-port_specs syntax
|
%% TODO: DEPRECATED: remove support for non-port_specs syntax
|
||||||
|
|
||||||
|
|
||||||
%% drop ArchRegex from specs
|
%% drop ArchRegex from specs
|
||||||
lists:map(fun({_, Target, Sources}) ->
|
lists:map(fun({_, Target, RawSources}) ->
|
||||||
{Target, Sources};
|
{Target, sources_to_bins(RawSources)};
|
||||||
(Spec) ->
|
({Target, RawSources}) ->
|
||||||
Spec
|
{Target, sources_to_bins(RawSources)}
|
||||||
end, Specs0)
|
end, Specs0)
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
sources_to_bins(RawSources) ->
|
||||||
|
Sources = lists:flatmap(fun filelib:wildcard/1, RawSources),
|
||||||
|
lists:map(fun source_to_bin/1, Sources).
|
||||||
|
|
||||||
%% DEPRECATED
|
%% DEPRECATED
|
||||||
make_so_specs(Config, AppFile, Bins) ->
|
make_so_specs(Config, AppFile, Bins) ->
|
||||||
case rebar_config:get(Config, so_specs, undefined) of
|
case rebar_config:get(Config, so_specs, undefined) of
|
||||||
|
|
Loading…
Reference in a new issue