Commit adc19cec authored by Logan Chien's avatar Logan Chien
Browse files

Add -fno-global-ctor-const-promotion option.

The global variable optimization pass of LLVM will try to
evalutate the global variables with static constructors, and
promote the global constants.  Although this optimization is
correct, it may cause some incompatability between gcc in
some incorrect code, which uses const_cast to cast the
constant to mutable.  If you are compiling the legacy code,
then you can try to add -fno-global-ctor-const-promotion
to your CXXFLAGS.

Change-Id: I24bae9f0bc82fbede0be35087ff5336eed300e5d
parent cf96ecc6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment