A source tells ET the actress and the pop star grew close while filming their upcoming movie, which Wilde is directing.
Love is in the air! Olivia Wilde and Harry Styles are growing close while working together on the set of their upcoming film.
A source tells ET, "Olivia and Harry are together for long days on set and have gotten to know each other really well, so it's all very organic."
The filmmaker/actress and the English pop star/actor sparked romance rumors over the weekend when they were spotted holding hands at a wedding in Montecito, California, where Styles officiated the ceremony.
Wilde is currently directing Styles in her upcoming psychological thriller, Don't Worry Darling, which centers on an unhappy housewife in the 1950s and her husband's dark secret.
According to the source, Olivia "wouldn't let a romantic relationship get in the way of a professional one, so anything they're doing is being done thoughtfully."
The romance may come as a surprise to some, considering news of Wilde's split from longtime partner and fiance Jason Sudeikis just broke in November. However, the couple -- who share a 6-year-old son, Otis, and a 4-year-old daughter, Daisy -- actually "split almost a year ago" according to the source.
"So it's not like she's rushing into something," the source adds. "Olivia and Jason talk all the time and are still close because of the kids. It's highly unlikely he was blind-sided by this news."
A second source tells ET, "Olivia and Harry got close through working together on Don't Worry Darling. Since her split from Jason, she has been more open to seeing new people."
"She's always liked Harry and it was one of the reasons she cast him and, since then, she's developed a thing for him," the source adds.
In Styles' history-making November cover story for Vogue, Wilde said she did "a little victory dance" when he was officially cast in the film.
"To me, he’s very modern and I hope that this brand of confidence as a male that Harry has -- truly devoid of any traces of toxic masculinity -- is indicative of his generation and therefore the future of the world," she said of the "Watermelon Sugar" singer. "I think he is in many ways championing that, spearheading that. It's pretty powerful and kind of extraordinary to see someone in his position redefining what it can mean to be a man with confidence."
For more on Wilde and Styles' burgeoning romance, check out the video below.
-- Reporting by Darla Murray.
RELATED CONTENT: