Skip to content

Microsoft LINK personality #2674

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

Merged
merged 2 commits into from
Aug 7, 2018
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions regression/goto-cl/Fo/link.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CORE goto-link

/ERRORREPORT:QUEUE /OUT:linked.exe /INCREMENTAL /NOLOGO /LIBPATH:..\foo\bar x.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"bla.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"bla.lib" /MACHINE:X86 /SAFESEH:NO dir/main1.obj dir/main2.obj
^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
^CONVERSION ERROR$
9 changes: 7 additions & 2 deletions regression/goto-cl/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
default: tests.log

test:
@../test.pl -p -c ../../../src/goto-cc/goto-cl
@../test.pl -p -c ../../../src/goto-cc/goto-cl -X goto-link
@cp ../../src/goto-cc/goto-cl.exe ../../src/goto-cc/goto-link.exe
@../test.pl -p -c ../../../src/goto-cc/goto-link -I goto-link

tests.log: ../test.pl
@../test.pl -p -c ../../../src/goto-cc/goto-cl
@../test.pl -p -c ../../../src/goto-cc/goto-cl -X goto-link
@cp ../../src/goto-cc/goto-cl.exe ../../src/goto-cc/goto-link.exe
@../test.pl -p -c ../../../src/goto-cc/goto-link -I goto-link

show:
@for dir in *; do \
Expand All @@ -17,5 +21,6 @@ clean:
find -name '*.out' -execdir $(RM) '{}' \;
find -name '*.gb' -execdir $(RM) '{}' \;
find -name '*.obj' -execdir $(RM) '{}' \;
find -name '*.exe' -execdir $(RM) '{}' \;
find -name '*.goto-cc-saved' -execdir $(RM) '{}' \;
$(RM) tests.log
2 changes: 2 additions & 0 deletions src/goto-cc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ SRC = armcc_cmdline.cpp \
linker_script_merge.cpp \
ms_cl_cmdline.cpp \
ms_cl_mode.cpp \
ms_link_cmdline.cpp \
ms_link_mode.cpp \
# Empty last line

OBJ += ../big-int/big-int$(LIBEXT) \
Expand Down
24 changes: 16 additions & 8 deletions src/goto-cc/goto_cc_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,22 @@ Date: May 2006
#include <util/unicode.h>
#include <util/get_base_name.h>

#include "gcc_cmdline.h"
#include "armcc_cmdline.h"
#include "ms_cl_cmdline.h"
#include "ld_cmdline.h"
#include "bcc_cmdline.h"
#include "as_cmdline.h"
#include "as86_cmdline.h"
#include "as_cmdline.h"
#include "bcc_cmdline.h"
#include "gcc_cmdline.h"
#include "ld_cmdline.h"
#include "ms_cl_cmdline.h"
#include "ms_link_cmdline.h"

#include "armcc_mode.h"
#include "as_mode.h"
#include "cw_mode.h"
#include "gcc_mode.h"
#include "ld_mode.h"
#include "ms_cl_mode.h"
#include "ms_link_mode.h"

std::string to_lower_string(const std::string &s)
{
Expand Down Expand Up @@ -65,15 +67,21 @@ int main(int argc, const char **argv)
std::string base_name=get_base_name(argv[0], false);
#endif

if(base_name=="goto-link" || base_name=="link" ||
base_name=="goto-cl" || base_name=="cl")
if(base_name == "goto-cl" || base_name == "cl")
{
// this is the Visual Studio personality
// this is the Visual Studio CL personality
ms_cl_cmdlinet cmdline;
cmdline.parse_env();
ms_cl_modet ms_cl_mode(cmdline, base_name);
return ms_cl_mode.main(argc, argv);
}
else if(base_name == "goto-link" || base_name == "link")
{
// this is the Visual Studio LINK personality
ms_link_cmdlinet cmdline;
ms_link_modet ms_link_mode(cmdline);
return ms_link_mode.main(argc, argv);
}
else if(base_name=="goto-cw" ||
base_name=="goto-cw-link")
{
Expand Down
Loading