diff --git a/README.markdown b/README.markdown index e17b218..e8ff8b3 100644 --- a/README.markdown +++ b/README.markdown @@ -422,6 +422,10 @@ The following Unix compiler cc/gcc options are understood by cccl: - **-dumpversion** Version of cl.exe based on info in copyright banner - **-g**[0-9] Converts to cl.exe's **/Zi** - **-O0** Converts to cl.exe's **/Ot** optimization option + - **-O2** and **-O3** Converts to cl.exe's **/O2** optimization option + - **-Ofast** Converts to cl.exe's **/O2** and **/fp:fast** optimization option + - **-Os** Converts to cl.exe's **/O1** optimization option + - **-Oz** Converts to cl.exe's **/Os** optimization option - **-Lpath** Converts to linker option **/LIBPATH:_path_** - **-llibrary** Converts to **lib_library_.lib** (except **-link**) - **-m386** Converts to cl.exe's **/G3** diff --git a/cccl b/cccl index e977449..4038046 100755 --- a/cccl +++ b/cccl @@ -175,6 +175,22 @@ EOF clopt+=("${slash}O2") ;; + -O3) + clopt+=("${slash}O2") + ;; + + -Ofast) + clopt+=("${slash}O2" "${slash}fp:fast") + ;; + + -Os) + clopt+=("${slash}O1") + ;; + + -Oz) + clopt+=("${slash}Os") + ;; + -L) shift path=`echo "$1"` @@ -310,12 +326,7 @@ EOF #ignore aliasing ;; - -isystem) - shift - clopt+=("${slash}I$1") - ;; - - -I) + -isystem | -I) shift clopt+=("${slash}I$1") ;; @@ -351,7 +362,7 @@ EOF fi ;; - *.cc | *.cxx | *.C) + *.cc | *.cxx | *.C | *.c++) # C++ source file with non .cpp extension, make sure cl understand # that it is C++ clopt+=("${slash}Tp$1")