@ Override public String decorateLinkerOption ( final StringBuffer buf , final String arg ) { String decoratedArg = arg ; if ( arg . length ( ) > 1 && arg . charAt ( 0 ) == ' ' ) { switch ( arg . charAt ( 1 ) ) { // // passed automatically by GCC // case ' ' : case ' ' : case ' ' : /* Darwin */ case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : break ; default : boolean known = false ; for ( final String linkerOption : linkerOptions ) { if ( linkerOption . equals ( arg ) ) { known = true ; break ; } } if ( ! known ) { buf . setLength ( 0 ) ; buf . append ( "-Wl," ) ; buf . append ( arg ) ; decoratedArg = buf . toString ( ) ; } break ; } } return decoratedArg ; }
Allows drived linker to decorate linker option . Override by GppLinker to prepend a - Wl to pass option to through gcc to linker .