RF: add link flags option to optional compile

Allow optional compile to pass link flags separately from compile flags.