As a supplement to MGN's great answer on CxG in general, there's a closely related approach by Ray Jackendoff and Peter Culicover called "Parallel Architecture" that I think is relevant here.
The question asks whether syntax determines/constrains semantics, semantics determines/constrains syntax, or neither. But there's a fourth possibility: both.
Syntax is inherently tree-structured; that's presumably uncontroversial. And semantics is also inherently tree-structured: PAST(LIKE(John, PROPERTY-OF(Mary, smile))) doesn't make sense unless the argument to PAST is the whole liking, and one of the arguments to LIKE is Mary's smile. There are also both syntactic and semantic mechanisms for coreference. And so on.
The way PA handles this is to treat each construction as having not a syntactic structure with dependent semantics, or a semantic structure with dependent syntax, but instead both a semantic structure and a syntactic structure, plus an interface between the two that determines how components are linked up (and possibly adds additional constraints).1
If you look at a fixed idiom construction, like MGN's "kick the bucket", you get a simple semantic structure with a nonsimple syntax:2
- cognitive structure: DIE1
- syntactic structure: [VP kickV [NP^ the bucket]]1
In other words, at the syntactic level, we have a perfectly normal verb phrase, but the verb, noun head of the complement, etc. aren't attached to any meaning; rather, the entire verb phrase is attached to a meaning (that's what the coindexed subscript represents).
Or, for an idiom with a "variable" in it:
- cognitive structure: SUPERLATIVE(x1)2
- syntactic structure: [NP theD motherN [PP ofP [NP allD [N' a1 -s]]]2
Here, both semantics and syntax are compositional, but with different structures. The "a" inside the syntactic construction is linked to the "x" in the semantic construction, and the entire syntactic tree is linked to the entire semantic tree, but, e.g., the PP syntactic subtree isn't linked to anything.
So, which tree do you "build first" when producing or processing a sentence? Neither. As you go along, you select constructions that have both syntax and semantics and assemble them into larger compositions that also have syntax and semantics, following constraints on both.
In fact, all of the things that traditional generative grammar considers "rules" are like this—the simple active sentence construction is just an idiom with more, and more complicated, variables.
Of course often both syntax and semantics are perfectly compositional, and coindexed in the obvious way, like this construction:3
- cognitive structure: PROPERTY-OF1(x2, y3)
- syntactic structure: [NP [DP [NP a2] -'s] bN, 3]]1
… but that's just a very common feature of many constructions, not actually a rule that applies everywhere, as it would be be in a syntax-first or semantics-first theory.
If you could show that in every case, the semantic structure can be derived from the syntactic structure (as traditional generative grammar holds), or vice-versa (as Generative Semantics claimed), then this whole mechanism would just be extra complexity for no real purpose. But Jackendoff and Culicover argue that can't be done. Their book Simpler Syntax is a reasonably approachable introduction to their argument.
1. In fact, there's also a phonological structure, and there's interfaces between all 6 pairs. For example, that's how you handle the altered prosody that goes with topicalization, or syntactic effects of phonological weight in cases like heavy NP shift.
2. The "standard" way to draw things is with two trees, and arrows between nodes in the trees, because using "bracket trees" and indexes gets hard to follow as soon as you try to deal with large phrases or anything nonlocal like anaphora or coordination. But I'll try to keep things simple enough that we can stay with brackets.
3. This is oversimplified; "Mary's" is probably a separable component at the semantic level as well as the syntactic level, and "-'s" probably has an inherent meaning that the "x's y" construction relies on rather than duplicating. And I've left out most of the semantic constraints on all of these trees—for example, as drawn, there's no reason you couldn't use these constructions to build a phrase like "John's mother of all Marys kicked the bucket", which you obviously can't. But I think this is enough to show the idea.