[m-rev.] diff: fix a problem with MSVC and ll_debug grades

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Oct 4 15:48:26 AEDT 2011


Branches: main, 11.07

Fix a problem with ll_debug grades and MSVC.

scripts/mgnuc.in:
 	Avoid using -O0 wit MSVC: the corresponding option is
 	-Od.

Julien.

Index: scripts/mgnuc.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/scripts/mgnuc.in,v
retrieving revision 1.139
diff -u -r1.139 mgnuc.in
--- scripts/mgnuc.in	3 Oct 2011 13:40:17 -0000	1.139
+++ scripts/mgnuc.in	4 Oct 2011 04:23:02 -0000
@@ -67,6 +67,7 @@
                ;;
          esac
          DEBUG_OPT="-g"
+        DISABLE_OPTS_OPT="-O0"
          COMPILER=gcc
          ;;
      *clang*)
@@ -74,6 +75,7 @@
          CHECK_OPTS="-w"
          OPT_OPTS="@OPT_FLAGS_FOR_CLANG@ $CFLAGS_FOR_NO_STRICT_ALIASING -fomit-frame-pointer"
          DEBUG_OPT="-g"
+        DISABLE_OPTS_OPT="-O0"
          COMPILER=clang
          ;;
      *lcc*)
@@ -81,6 +83,7 @@
          CHECK_OPTS="-w"     # turn off all warnings due to spurious warnings.
          OPT_OPTS=""
          DEBUG_OPT="-g"
+        DISABLE_OPTS_OPT="-O0"
          COMPILER=lcc
          ;;
      *cl* | *CL*)
@@ -88,6 +91,7 @@
          CHECK_OPTS=""
          OPT_OPTS=""
          DEBUG_OPT="-Zi"
+        DISABLE_OPTS_OPT="-Od"
          COMPILER=cl
          ;;
      *)
@@ -95,6 +99,7 @@
          CHECK_OPTS=
          OPT_OPTS="-O"
          DEBUG_OPT="-g"
+        DISABLE_OPTS_OPT="-O0"
          COMPILER=unknown
          ;;
  esac
@@ -444,7 +449,7 @@
  esac

  case $ll_debug in
-    true)           LL_DEBUG_OPTS="-DMR_LL_DEBUG $DEBUG_OPT -O0" ;;
+    true)           LL_DEBUG_OPTS="-DMR_LL_DEBUG $DEBUG_OPT $DISABLE_OPTS_OPT" ;;
      false)          LL_DEBUG_OPTS="" ;;
  esac


--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list