Page MenuHomePhabricator

[builtins] Prevent racing between setting supported architectures in builtin-config-ix and config-ix
Needs ReviewPublic

Authored by george.karpenkov on Apr 5 2018, 3:29 PM.



Both builtin-config-ix and config-ix set variables DARWIN_${platform}_ARCHS to indicate supporting architectures.
Those variables are cached, so the writes race, and the first write wins.
Currently, everything was working as expected because in builtins-only mode only builtins would be compiled, and otherwise, config-ix was processed first, winning the race.

Upon closer inspection, builtin-config-ix does not even use the created variables DARWIN_${platform}_ARCHS, and simply populates it's own variables.
This patch fixes the race by postfixing the variables used in builtin-* with BUILTIN.

Diff Detail

Event Timeline

AFAICT, this looks good.

delcypher added inline comments.Apr 10 2018, 1:38 PM

We had an offline conversation about this but I'm not sure if we resolved the issue.
This looks wrong DARWIN_${platform}sim_ARCHS_builtin} is not an architecture name and it doesn't look like this variable name gets expanded in darwin_test_archs() AFAICT.


Same problem here.