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

cl-like linker: specify target platform #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
14 changes: 12 additions & 2 deletions src/compilers.c
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ compiler_gcc_args_lto(void)
static const struct args *
compiler_cl_args_always(void)
{
COMPILER_ARGS({ "/nologo" });
COMPILER_ARGS({ "/NOLOGO" });

return &args;
}
Expand Down Expand Up @@ -1551,6 +1551,16 @@ linker_link_args_input_output(const char *in, const char *out)
return &args;
}

static const struct args *
linker_link_args_always(void)
{
COMPILER_ARGS({ "/NOLOGO", NULL });

argv[1] = host_machine.address_bits == 64 ? "/MACHINE:X64" : "/MACHINE:X86";

return &args;
}

static const struct args *
linker_lld_link_args_whole_archive(void)
{
Expand Down Expand Up @@ -1617,7 +1627,7 @@ build_linkers(void)
link.args.shared = linker_link_args_shared;
link.args.soname = linker_link_args_soname;
link.args.input_output = linker_link_args_input_output;
link.args.always = compiler_cl_args_always;
link.args.always = linker_link_args_always;

struct linker lld_link = link;
lld_link.args.whole_archive = linker_lld_link_args_whole_archive;
Expand Down
Loading