restructuring to separate the compiler-specific and library-specific stuff