mirror of
https://github.com/servo/servo.git
synced 2025-06-10 01:23:13 +00:00
Revert "Use rustdoc --document-private-item instead of deprecated flags"
This reverts commit d96f0ff6a7
.
This commit is contained in:
parent
e2c89df8ee
commit
6dff251e35
3 changed files with 10 additions and 6 deletions
4
etc/rustdoc-with-private
Executable file
4
etc/rustdoc-with-private
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
# Skip the strip-private and strip-hidden rustdoc passes
|
||||
# https://github.com/rust-lang/rust/issues/15347
|
||||
rustdoc --no-defaults --passes collapse-docs --passes unindent-comments --passes strip-priv-imports "$@"
|
|
@ -388,7 +388,7 @@ class CommandBase(object):
|
|||
" --release" if release else ""))
|
||||
sys.exit()
|
||||
|
||||
def build_env(self, hosts_file_path=None, target=None, is_build=False, geckolib=False):
|
||||
def build_env(self, hosts_file_path=None, target=None, is_build=False, geckolib=False, test_unit=False):
|
||||
"""Return an extended environment dictionary."""
|
||||
env = os.environ.copy()
|
||||
if sys.platform == "win32" and type(env['PATH']) == unicode:
|
||||
|
@ -486,7 +486,10 @@ class CommandBase(object):
|
|||
if hosts_file_path:
|
||||
env['HOST_FILE'] = hosts_file_path
|
||||
|
||||
env['RUSTDOCFLAGS'] = "--document-private-items"
|
||||
if not test_unit:
|
||||
# This wrapper script is in bash and doesn't work on Windows
|
||||
# where we want to run doctests as part of `./mach test-unit`
|
||||
env['RUSTDOC'] = path.join(self.context.topdir, 'etc', 'rustdoc-with-private')
|
||||
|
||||
if self.config["build"]["rustflags"]:
|
||||
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " " + self.config["build"]["rustflags"]
|
||||
|
|
|
@ -255,12 +255,9 @@ class MachCommands(CommandBase):
|
|||
|
||||
packages.discard('stylo')
|
||||
|
||||
env = self.build_env()
|
||||
env = self.build_env(test_unit=True)
|
||||
env["RUST_BACKTRACE"] = "1"
|
||||
|
||||
# Work around https://github.com/rust-lang/cargo/issues/4790
|
||||
del env["RUSTDOCFLAGS"]
|
||||
|
||||
if "msvc" in host_triple():
|
||||
# on MSVC, we need some DLLs in the path. They were copied
|
||||
# in to the servo.exe build dir, so just point PATH to that.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue