Oil companies have contributed $8 million to fight against Measure G, a ballot measure in San Luis Obispo County that would block the expansion of local oil operations.