Golden State has no first rounders outside of the one they have in this draft (which can't be traded until the day of the draft, since they'd have to make the pick). The next first rounder they have to trade is 2019.
Either they'll likely have to give up Barnes or they'll just have to eat the luxury tax for next season (which is also a very viable option and probably their best). They could potentially give up Ezeli, but that's much more risky, in my opinion: that would leave Bogut as the only defensive true big on their roster. I wouldn't want to bank on Bogut's health throughout a whole season. Barnes is a nice piece, but he's a luxury -- one that they may deem expendable.
Don't forget that cap space doesn't need to be used purely on signing premier players: tons of rebuilding teams do what Philly does and use their cap space to sign undrafted/D-League players throughout the year. The cap space could even be used later in the season to accept a salary dump from a desperate team at the trade deadline -- a team that would likely be much more willing to include more appealing assets than the 30th pick in the draft.