They don't need to build tech. They can buy it. GM can write some pretty big checks. They flat out bought Cruise just to cover their butts.
When I was an intern at a defense contractor ~1/10th the size of GM my cube was across from procurement. I think a lot of people here don't understand the kind of scale companies like this play at. Your problem isn't "how do we pay for this" it's "will anyone sell me all this all at once or sign a contract to provide it all over the timetable we want". You make bets on how many times around the earth the welding wire you'll buy next quarter will go. GM shipped ~10 million vehicles in 2017. That means they had to sign a contract with someone to supply approximately an Exxon Valdez worth of motor oil and another of ATF just for their factories.