Commits

Nitin Gupta committed 50c5ac2

Handle case for optimize "Off"

Makes gcc/clang use '-O0' when optimize "Off" is set

  • Participants
  • Parent commits 2245015

Comments (0)

Files changed (2)

File src/tools/gcc.lua

 			Strict = "-ffloat-store",
 		},
 		optimize = {
+			Off = "-O0",
 			On = "-O2",
 			Size = "-Os",
 			Speed = "-O3",

File tests/tools/test_gcc.lua

 		test.isequal({ "-msse2" }, gcc.getcflags(cfg))
 	end
 
+	function suite.cflags_onNoOptimize()
+		optimize "Off"
+		prepare()
+		test.isequal({ "-O0" }, gcc.getcflags(cfg))
+	end
 
 --
 -- Check the translation of CXXFLAGS.