1

Update:
Now, I use

using msvc : 14.0 : : <compileflags>/O1 ; 

in my project-config.jam. The behavior is what I expect.
But when I replace /O1 to /Ox, the .lib is same as /O2.
/Ox doesn't work correctly!!!

Origin:
I use this command

b2.exe variant=release

but how do I force boost build to use /Ox instead of /O2?
(The default setting for release builds is /O2, but I want /Ox)

P.S., I try

using msvc : 14.0 : : /Ox ; 

in my project-config.jam, but it doesn't work.

Caesar
  • 971
  • 6
  • 13
  • Why do you want /Ox? You know [it is essentially the same as /O2](http://stackoverflow.com/questions/5063334/what-is-the-difference-between-the-ox-and-o2-compiler-options), right? The only difference is /O2 also enables string pooling and function-level linking. Why would you *not* want either of those? – Cody Gray - on strike Feb 16 '16 at 12:39
  • @CodyGray In my view, string pooling is slower. (But it is still debatable.) – Caesar Feb 16 '16 at 12:50

1 Answers1

0

See the tutorial here.

The section of interest:

<cflags> ... Pass flags to C compiler.

<cxxflags> ... Pass flags to C++ compiler

Community
  • 1
  • 1
Steve
  • 1,760
  • 10
  • 18