{"action":"opened","issue":{"url":"https://api.github.com/repos/vim/vim/issues/496","labels_url":"https://api.github.com/repos/vim/vim/issues/496/labels{/name}","comments_url":"https://api.github.com/repos/vim/vim/issues/496/comments","events_url":"https://api.github.com/repos/vim/vim/issues/496/events","html_url":"https://github.com/vim/vim/issues/496","id":118322494,"number":496,"title":"Enable LTCG for MSVC 14.0","user":{"login":"raymond-w-ko","id":855478,"avatar_url":"https://avatars.githubusercontent.com/u/855478?v=3","gravatar_id":"","url":"https://api.github.com/users/raymond-w-ko","html_url":"https://github.com/raymond-w-ko","followers_url":"https://api.github.com/users/raymond-w-ko/followers","following_url":"https://api.github.com/users/raymond-w-ko/following{/other_user}","gists_url":"https://api.github.com/users/raymond-w-ko/gists{/gist_id}","starred_url":"https://api.github.com/users/raymond-w-ko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raymond-w-ko/subscriptions","organizations_url":"https://api.github.com/users/raymond-w-ko/orgs","repos_url":"https://api.github.com/users/raymond-w-ko/repos","events_url":"https://api.github.com/users/raymond-w-ko/events{/privacy}","received_events_url":"https://api.github.com/users/raymond-w-ko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-23T05:34:02Z","updated_at":"2015-11-23T05:34:02Z","closed_at":null,"body":"The version checks to map Visual Studio 2015 to MSVC 14.0 was added, but the checks for MSVC 14.0 were never done to determine that it was safe to enable link to code generation. Adding more a version check to the following conditionals fixes this and makes the binary generated by Visual Studio 2015 potentially faster.\r\n\r\n```diff\r\ndiff --git a/src/Make_mvc.mak b/src/Make_mvc.mak\r\nindex acc2ee5..dac756a 100644\r\n--- a/src/Make_mvc.mak\r\n+++ b/src/Make_mvc.mak\r\n@@ -512,7 +512,7 @@ OPTFLAG = /O2\r\n OPTFLAG = /Ox\r\n !endif\r\n\r\n-!if (\"$(MSVCVER)\" == \"8.0\") || (\"$(MSVCVER)\" == \"9.0\") || (\"$(MSVCVER)\" == \"10.0\") || (\"$(MSVCVER)\" == \"11.0\") || (\"$(MSVCVER)\" == \"12.0\")\r\n+!if (\"$(MSVCVER)\" == \"8.0\") || (\"$(MSVCVER)\" == \"9.0\") || (\"$(MSVCVER)\" == \"10.0\") || (\"$(MSVCVER)\" == \"11.0\") || (\"$(MSVCVER)\" == \"12.0\") || (\"$(MSVCVER)\" == \"14.0\")\r\n # Use link time code generation if not worried about size\r\n !if \"$(OPTIMIZE)\" != \"SPACE\"\r\n OPTFLAG = $(OPTFLAG) /GL\r\n@@ -1023,7 +1023,7 @@ LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(NODEFAULTLIB) $(LIBC) $(OLE_LIB) user32.lib\r\n\r\n # Report link time code generation progress if used.\r\n !ifdef NODEBUG\r\n-!if (\"$(MSVCVER)\" == \"8.0\") || (\"$(MSVCVER)\" == \"9.0\") || (\"$(MSVCVER)\" == \"10.0\") || (\"$(MSVCVER)\" == \"11.0\") || (\"$(MSVCVER)\" == \"12.0\")\r\n+!if (\"$(MSVCVER)\" == \"8.0\") || (\"$(MSVCVER)\" == \"9.0\") || (\"$(MSVCVER)\" == \"10.0\") || (\"$(MSVCVER)\" == \"11.0\") || (\"$(MSVCVER)\" == \"12.0\") || (\"$(MSVCVER)\" == \"14.0\")\r\n !if \"$(OPTIMIZE)\" != \"SPACE\"\r\n LINKARGS1 = $(LINKARGS1) /LTCG:STATUS\r\n !endif\r\n```"}}