Skip to content

Commit

Permalink
Merge pull request #33 from animalize/msvc_02
Browse files Browse the repository at this point in the history
Use /O2 compiler option instead of /Ox for MSVC
  • Loading branch information
jaraco authored Apr 24, 2021
2 parents bd08b02 + b04b03f commit d8a8d85
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion distutils/_msvccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def initialize(self, plat_name=None):
# Future releases of Python 3.x will include all past
# versions of vcruntime*.dll for compatibility.
self.compile_options = [
'/nologo', '/Ox', '/W3', '/GL', '/DNDEBUG', '/MD'
'/nologo', '/O2', '/W3', '/GL', '/DNDEBUG', '/MD'
]

self.compile_options_debug = [
Expand Down
4 changes: 2 additions & 2 deletions distutils/msvc9compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,13 +399,13 @@ def initialize(self, plat_name=None):

self.preprocess_options = None
if self.__arch == "x86":
self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3',
self.compile_options = [ '/nologo', '/O2', '/MD', '/W3',
'/DNDEBUG']
self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3',
'/Z7', '/D_DEBUG']
else:
# Win64
self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GS-' ,
self.compile_options = [ '/nologo', '/O2', '/MD', '/W3', '/GS-' ,
'/DNDEBUG']
self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/GS-',
'/Z7', '/D_DEBUG']
Expand Down
4 changes: 2 additions & 2 deletions distutils/msvccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,13 @@ def initialize(self):

self.preprocess_options = None
if self.__arch == "Intel":
self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GX' ,
self.compile_options = [ '/nologo', '/O2', '/MD', '/W3', '/GX' ,
'/DNDEBUG']
self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/GX',
'/Z7', '/D_DEBUG']
else:
# Win64
self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GS-' ,
self.compile_options = [ '/nologo', '/O2', '/MD', '/W3', '/GS-' ,
'/DNDEBUG']
self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/GS-',
'/Z7', '/D_DEBUG']
Expand Down

0 comments on commit d8a8d85

Please sign in to comment.