bug 1316329 - build from a symlink dir in generic-worker builds. r=pmoore,gps
MozReview-Commit-ID: EXp08oIquPF
--- a/taskcluster/taskgraph/transforms/job/mozharness.py
+++ b/taskcluster/taskgraph/transforms/job/mozharness.py
@@ -215,12 +215,25 @@ def mozharness_on_windows(config, job, t
hg_command.append('robustcheckout')
hg_command.extend(['--sharebase', 'y:\\hg-shared'])
hg_command.append('--purge')
hg_command.extend(['--upstream', 'https://hg.mozilla.org/mozilla-unified'])
hg_command.extend(['--revision', env['GECKO_HEAD_REV']])
hg_command.append(env['GECKO_HEAD_REPOSITORY'])
hg_command.append('.\\build\\src')
- worker['command'] = [
+ worker['command'] = []
+ # sccache currently uses the full compiler commandline as input to the
+ # cache hash key, so create a symlink to the task dir and build from
+ # the symlink dir to get consistent paths.
+ if taskdesc.get('needs-sccache'):
+ worker['command'].extend([
+ r'if exist z:\build rmdir z:\build',
+ r'mklink /d z:\build %cd%',
+ # Grant delete permission on the link to everyone.
+ r'icacls z:\build /grant *S-1-1-0:D /L',
+ r'cd /d z:\build',
+ ])
+
+ worker['command'].extend([
' '.join(hg_command),
' '.join(mh_command)
- ]
+ ])