I'm looking for a way to activate optimization flag independently like in GCC, because looking from GCC docs we can see what optimizations -Ox flag consist of.
I saw a post on how to parse optimizations used by clang for -Ox here.
But those optimization flags is not there if i run clang++ --help. because the flags are for opt.
Is there a way for me to do that? The clang that i'm using comes from NDK r16b.
EDIT: I'm sorry for the confusion caused by my question. I'm adding an example of what I want to do in clang that can be done easily in GCC.
On GCC I can write:
g++ -fauto-inc-dec -fbranch-count-reg -fcombine-stack-adjustments -fcompare-elim -fcprop-registers -fdce -fdefer-pop -fdelayed-branch -fdse -fforward-propagate -fguess-branch-probability -fif-conversion2 -fif-conversion -finline-functions-called-once -fipa-pure-const -fipa-profile -fipa-reference -fmerge-constants -fmove-loop-invariants -fomit-frame-pointer -freorder-blocks -fshrink-wrap -fshrink-wrap-separate -fsplit-wide-types -fssa-backprop -fssa-phiopt -ftree-bit-ccp -ftree-ccp -ftree-ch -ftree-coalesce-vars -ftree-copy-prop -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-forwprop -ftree-fre -ftree-phiprop -ftree-sink -ftree-slsr -ftree-sra -ftree-pta -ftree-ter -funit-at-a-time
or
g++ -O1
which should be the same according to the doc. can I do that with clang?