revising modularize to get default options

Hi,

I need to revise modularize to get the default options like the driver does. For example, currently I need to pass in the following to mimic what the driver does:

-target x86_64 -Xclang -std=c++11 -w -D__ORBIS__ -D__SSE3__ -D__POPCNT__ -D__SSE4_1__ -D__SSSE3__ -D__unix__ -D__SSE4A__ -D__MMX__ -D__SSE4_2__ -D__AES__ -D__PCLMUL__ -I"$(XXX_SDK_DIR)" -I"$(XXX_SDK_DIR)/target/include" -I"$(XXX_SDK_DIR)/target/include_common" -I"$(XXX_SDK_DIR)/host_tools/lib/clang/include"

What would be the easiest and best way to modify modularize to do this? Currently it uses ClangTool, a custom action class, and some argument filtering.

It would be nice if there just were a function call to get the defaults.

Thanks.

-John