"-Xcompiler" "-fPIC" actually constitutes a single flag that needs to go together. "-Xcompiler" passes whatever comes immediately after to the host compiler (gcc, MSVC, whatever).