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

RFC: Remove support for MSVC #52

Merged
merged 13 commits into from
Dec 2, 2021
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Unreleased
* Add ends to locations, allowing for ranges.
* Add additional expression locations to statements, etc.
* Drop all support for MSVC

## Older versions

Expand Down
10 changes: 0 additions & 10 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ $(CILLY): $(CILLY_EXE_BIN) $(CILLYDIR)/Makefile
$(MAKE) -C $(CILLYDIR)

# Create the machine dependency module
# If the cl command cannot be run then the MSVC part will be identical to GCC
.PHONY : machdep
machdep: $(OBJDIR)/machdep.ml
$(OBJDIR)/machdep.ml : src/machdep-ml.c configure.ac Makefile.in
Expand Down Expand Up @@ -204,15 +203,6 @@ $(OBJDIR)/machdep.ml : src/machdep-ml.c configure.ac Makefile.in
@echo "let gcc = {" >>$@
@$(OBJDIR)/machdep-ml.exe >>$@
@echo "}" >>$@
@if cl -D_MSVC $< -Fe$(OBJDIR)/machdep-ml.exe -Fo$(OBJDIR)/machdep-ml.obj ;then \
echo "let hasMSVC = true" >>$@ ;\
echo "let msvc = {" >>$@ ;\
$(OBJDIR)/machdep-ml.exe >>$@ ;\
echo "}" >>$@ \
;else \
echo "let hasMSVC = false" >>$@ ;\
echo "let msvc = gcc" >> $@ \
;fi
@echo "let theMachine : mach ref = ref gcc" >>$@

$(CILLYDIR)/App/$(CILLYMOD).pm: $(CILLYDIR)/App/$(CILLYMOD).pm.in src/machdep-ml.c configure.ac Makefile.in
Expand Down
1 change: 0 additions & 1 deletion config.mk.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# A bunch of variables -*- Mode: makefile -*-
export HAS_MSVC=@HAS_MSVC@
export @DEFAULT_COMPILER@=1
28 changes: 0 additions & 28 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,6 @@ CIL_VERSION_MINOR
CIL_VERSION_MAJOR
DEFAULT_CIL_MODE
DEFAULT_COMPILER
HAS_MSVC
EMUL
LIBOBJS
CYGPATH
Expand Down Expand Up @@ -3470,30 +3469,6 @@ test -n "$target_alias" &&
DEFAULT_COMPILER=_GNUCC
DEFAULT_CIL_MODE=GNUCC

# is the microsoft compiler available?
# hmm.. I think we should check the version or something, because
# sometimes people have Common Lisp's interpreter called 'cl' ..
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for msvc cl.exe (optional)" >&5
printf %s "checking for msvc cl.exe (optional)... " >&6; }
# See if CC points to the MS compiler
if "$CC" 2>&1 | grep "Microsoft" >/dev/null; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found, set as default" >&5
printf "%s\n" "found, set as default" >&6; }
HAS_MSVC=yes
DEFAULT_COMPILER=_MSVC
DEFAULT_CIL_MODE=MSVC
CFLAGS="-WX"
else
if cl 2>&1 | grep "Microsoft" >/dev/null ;then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
printf "%s\n" "found" >&6; }
HAS_MSVC=yes
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
printf "%s\n" "not found" >&6; }
HAS_MSVC=no
fi
fi

# ------------------- OCaml ----------------

Expand Down Expand Up @@ -5266,7 +5241,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
printf "%s\n" "$THREAD_IS_KEYWORD" >&6; }

# Does gcc add underscores to identifiers to make assembly labels?
# (I think MSVC always does)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gcc adds underscores to assembly labels." >&5
printf %s "checking if gcc adds underscores to assembly labels.... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Expand Down Expand Up @@ -6046,7 +6020,6 @@ printf "%s\n" "$real_type" >&6; }




# finish the configure script and generate various files; ./configure
# will apply variable substitutions to <filename>.in to generate <filename>;

Expand Down Expand Up @@ -7433,7 +7406,6 @@ fi
cat <<EOF

CIL configuration:
(optional) cl.exe found: HAS_MSVC $HAS_MSVC
gcc to use CC $CC
default compiler DEFAULT_COMPILER $DEFAULT_COMPILER
CIL version CIL_VERSION $CIL_VERSION
Expand Down
23 changes: 0 additions & 23 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -82,26 +82,6 @@ AC_EXEEXT
DEFAULT_COMPILER=_GNUCC
DEFAULT_CIL_MODE=GNUCC

# is the microsoft compiler available?
# hmm.. I think we should check the version or something, because
# sometimes people have Common Lisp's interpreter called 'cl' ..
AC_MSG_CHECKING(for msvc cl.exe (optional))
# See if CC points to the MS compiler
if "$CC" 2>&1 | grep "Microsoft" >/dev/null; then
AC_MSG_RESULT([found, set as default])
HAS_MSVC=yes
DEFAULT_COMPILER=_MSVC
DEFAULT_CIL_MODE=MSVC
CFLAGS="-WX"
else
if cl 2>&1 | grep "Microsoft" >/dev/null ;then
AC_MSG_RESULT(found)
HAS_MSVC=yes
else
AC_MSG_RESULT(not found)
HAS_MSVC=no
fi
fi

# ------------------- OCaml ----------------

Expand Down Expand Up @@ -155,7 +135,6 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main(int __thread) { return 0; }])],
AC_MSG_RESULT($THREAD_IS_KEYWORD)

# Does gcc add underscores to identifiers to make assembly labels?
# (I think MSVC always does)
AC_MSG_CHECKING([if gcc adds underscores to assembly labels.])
AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { __asm__("jmp _main"); }])],
UNDERSCORE_NAME=true,
Expand Down Expand Up @@ -186,7 +165,6 @@ CIL_CHECK_INTEGER_TYPE(wchar_t, TYPE_WCHAR_T)
# names of the variables that get substituted in files; for example,
# write @CIL_VERSION@ somewhere in a written file to get it substituted
AC_SUBST(EMUL)
AC_SUBST(HAS_MSVC)
AC_SUBST(DEFAULT_COMPILER)
AC_SUBST(DEFAULT_CIL_MODE)
AC_SUBST(CIL_VERSION_MAJOR)
Expand Down Expand Up @@ -216,7 +194,6 @@ AC_OUTPUT
cat <<EOF

CIL configuration:
(optional) cl.exe found: HAS_MSVC $HAS_MSVC
gcc to use CC $CC
default compiler DEFAULT_COMPILER $DEFAULT_COMPILER
CIL version CIL_VERSION $CIL_VERSION
Expand Down
Loading