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

Remove no longer necessary MacOS RUSTFLAGS hack #9

Merged
merged 1 commit into from
Jul 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions src/cargo_cmd.erl
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ exec(Command, Path) ->
{line, ?MAX_LINE_LENGTH},
use_stdio,
hide,
eof,
{env, env()}
eof
],

Command1 = lists:flatten(patch_on_windows(Command)),
Expand Down Expand Up @@ -118,20 +117,6 @@ patch_on_windows(Cmd) ->
Cmd
end.

-spec env() -> [{string(), string()}].
env() ->
case os:type() of
{unix, darwin} ->
% https://github.com/rust-lang/cargo/issues/3287
% https://github.com/rust-lang/rust/pull/36574
[
{"RUSTFLAGS",
"--codegen link-arg=-flat_namespace --codegen link-arg=-undefined --codegen link-arg=suppress"}
];
_ ->
[]
end.

% Ignore dialyzer warnings for finalize and handle_output as the spec
% for jsx:decode/2 is broken (does not include incomplete and with_tail)
-dialyzer([
Expand Down