Closed Bug 1305958 Opened 9 years ago Closed 9 years ago

Allow custom GENERATED_FILES in SYMBOLS_FILE

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox52 fixed)

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: ted, Assigned: ted)

References

Details

Attachments

(1 file)

NSS has its own special format for symbol export files--they're processed with some awful sed goop on Linux/OS X and just used directly on Windows. To support this I need to be able to use `SYMBOLS_FILE` but specify my own custom script via `GENERATED_FILES`.
I don't know what's up with those busted windows builds on try. I rebased locally and built and it built OK, so I'll push that to try and see how it goes.
It's still very busted on Try, so that's exciting.
Comment on attachment 8795668 [details] bug 1305958 - Allow custom GENERATED_FILES in SYMBOLS_FILE. https://reviewboard.mozilla.org/r/81636/#review81556 ::: python/mozbuild/mozbuild/frontend/emitter.py:682 (Diff revision 1) > - if not os.path.exists(symbols_file.full_path): > + if not os.path.exists(symbols_file.full_path): > - raise SandboxValidationError( > + raise SandboxValidationError( > - 'Path specified in SYMBOLS_FILE does not exist: %s ' > + 'Path specified in SYMBOLS_FILE does not exist: %s ' > - '(resolved to %s)' % (symbols_file, > + '(resolved to %s)' % (symbols_file, > - symbols_file.full_path), context) > + symbols_file.full_path), context) > - shared_args['symbols_file'] = True > + shared_args['symbols_file'] = symbols_file.target_basename + '.def' You shouldn't be adding a .def here. This leads to weirdness like .def.def files in the objdir. I'd rather keep the current name deriving logic in data.SharedLibrary, and make its constructor take a value that is either False (no symbol file), True (symbol file with the default name), or a file name, for the case you're adding. ::: python/mozbuild/mozbuild/frontend/emitter.py:684 (Diff revision 1) > - 'Path specified in SYMBOLS_FILE does not exist: %s ' > + 'Path specified in SYMBOLS_FILE does not exist: %s ' > - '(resolved to %s)' % (symbols_file, > + '(resolved to %s)' % (symbols_file, > - symbols_file.full_path), context) > + symbols_file.full_path), context) > - shared_args['symbols_file'] = True > + shared_args['symbols_file'] = symbols_file.target_basename + '.def' > + else: > + if symbols_file.target_basename not in generated_files: You also need to check that the file is in the current objdir (e.g. not !/foo or !../foo) because those won't work.
Attachment #8795668 - Flags: review?(mh+mozilla)
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #6) > https://treeherder.mozilla.org/#/jobs?repo=try&revision=2a69589c1233 This is pretty green, except for that one Win64 build that seems to have failed in some unrelated sccache weirdness.
Comment on attachment 8795668 [details] bug 1305958 - Allow custom GENERATED_FILES in SYMBOLS_FILE. https://reviewboard.mozilla.org/r/81636/#review82736 ::: python/mozbuild/mozbuild/frontend/emitter.py:661 (Diff revision 2) > - 'Path specified in SYMBOLS_FILE does not exist: %s ' > + 'Path specified in SYMBOLS_FILE does not exist: %s ' > - '(resolved to %s)' % (symbols_file, > + '(resolved to %s)' % (symbols_file, > - symbols_file.full_path), context) > + symbols_file.full_path), context) > - shared_args['symbols_file'] = True > + shared_args['symbols_file'] = True > + else: > + if symbols_file.target_basename not in generated_files: Looking at the code wrt my previous comment around here reveals something interesting: generated_files is a superset of GENERATED_FILES.
Attachment #8795668 - Flags: review?(mh+mozilla) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: