diff --git a/Makefile.in b/Makefile.in index fb674878f55..51f4d269768 100644 --- a/Makefile.in +++ b/Makefile.in @@ -120,15 +120,24 @@ CFG_CORELIB :=$(call CFG_LIB_NAME,core) CFG_STDLIB :=$(call CFG_LIB_NAME,std) CFG_LIBRUSTC :=$(call CFG_LIB_NAME,rustc) CFG_LIBSYNTAX :=$(call CFG_LIB_NAME,syntax) +CFG_LIBFUZZER :=$(call CFG_LIB_NAME,fuzzer) +CFG_LIBCARGO :=$(call CFG_LIB_NAME,cargo) +CFG_LIBRUSTDOC :=$(call CFG_LIB_NAME,rustdoc) STDLIB_GLOB :=$(call CFG_LIB_GLOB,std) CORELIB_GLOB :=$(call CFG_LIB_GLOB,core) LIBRUSTC_GLOB :=$(call CFG_LIB_GLOB,rustc) LIBSYNTAX_GLOB :=$(call CFG_LIB_GLOB,syntax) +LIBFUZZER_GLOB :=$(call CFG_LIB_GLOB,fuzzer) +LIBCARGO_GLOB :=$(call CFG_LIB_GLOB,cargo) +LIBRUSTDOC_GLOB :=$(call CFG_LIB_GLOB,rustdoc) STDLIB_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,std) CORELIB_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,core) LIBRUSTC_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rustc) LIBSYNTAX_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,syntax) +LIBFUZZER_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,fuzzer) +LIBCARGO_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,cargo) +LIBRUSTDOC_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rustdoc) # version-string calculation CFG_GIT_DIR := $(CFG_SRC_DIR).git diff --git a/mk/clean.mk b/mk/clean.mk index d36cbaf7d0b..00c00c0e2c1 100644 --- a/mk/clean.mk +++ b/mk/clean.mk @@ -57,6 +57,9 @@ clean$(1)_H_$(2): $(Q)rm -f $$(HBIN$(1)_H_$(2))/cargo$(X) $(Q)rm -f $$(HBIN$(1)_H_$(2))/serializer$(X) $(Q)rm -f $$(HBIN$(1)_H_$(2))/rustdoc$(X) + $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBFUZZER) + $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBCARGO) + $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTDOC) $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_RUNTIME) $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_CORELIB) $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_STDLIB) @@ -66,6 +69,9 @@ clean$(1)_H_$(2): $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(STDLIB_GLOB) $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTC_GLOB) $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBSYNTAX_GLOB) + $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBFUZZER_GLOB) + $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBCARGO_GLOB) + $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTDOC_GLOB) $(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_RUSTLLVM) $(Q)rm -f $$(HLIB$(1)_H_$(2))/libstd.rlib @@ -83,6 +89,9 @@ clean$(1)_T_$(2)_H_$(3): $(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/cargo$(X) $(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/serializer$(X) $(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/rustdoc$(X) + $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBFUZZER) + $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBCARGO) + $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTDOC) $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUNTIME) $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB) $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB) @@ -92,6 +101,9 @@ clean$(1)_T_$(2)_H_$(3): $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(STDLIB_GLOB) $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTC_GLOB) $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBSYNTAX_GLOB) + $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBFUZZER_GLOB) + $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBCARGO_GLOB) + $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTDOC_GLOB) $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUSTLLVM) $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libstd.rlib $(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a diff --git a/mk/install.mk b/mk/install.mk index 3a2dbceaaad..a26572f413a 100644 --- a/mk/install.mk +++ b/mk/install.mk @@ -71,8 +71,12 @@ install-host: $(SREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE)) $(Q)mkdir -p $(PREFIX_LIB) $(Q)mkdir -p $(PREFIX_ROOT)/share/man/man1 $(Q)$(call INSTALL,$(HB2),$(PHB),rustc$(X)) + $(Q)$(call INSTALL,$(HB2),$(PHB),fuzzer$(X)) + $(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBFUZZER)) $(Q)$(call INSTALL,$(HB2),$(PHB),cargo$(X)) + $(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBCARGO)) $(Q)$(call INSTALL,$(HB2),$(PHB),rustdoc$(X)) + $(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBRUSTDOC)) $(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUNTIME)) $(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(CORELIB_GLOB)) $(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(STDLIB_GLOB)) @@ -93,6 +97,9 @@ uninstall: $(Q)rm -f $(PHB)/cargo$(X) $(Q)rm -f $(PHB)/rustdoc$(X) $(Q)rm -f $(PHL)/$(CFG_RUSTLLVM) + $(Q)rm -f $(PHL)/$(CFG_FUZZER) + $(Q)rm -f $(PHL)/$(CFG_CARGO) + $(Q)rm -f $(PHL)/$(CFG_RUSTDOC) $(Q)rm -f $(PHL)/$(CFG_RUNTIME) $(Q)for i in \ $(call HOST_LIB_FROM_HL_GLOB,$(CORELIB_GLOB)) \ diff --git a/mk/target.mk b/mk/target.mk index 967191ab745..093bb136bc3 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -25,7 +25,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM): \ $$(Q)cp $$< $$@ $$(TBIN$(1)_T_$(2)_H_$(3))/rustc$$(X): \ - $$(RUSTC_INPUTS) \ + $$(RUSTC_INPUTS) \ $$(TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3)) @$$(call E, compile_and_link: $$@) $$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< diff --git a/mk/tools.mk b/mk/tools.mk index 6b7810de73b..011a7912852 100644 --- a/mk/tools.mk +++ b/mk/tools.mk @@ -1,40 +1,55 @@ # Rules for non-core tools built with the compiler, both for target # and host architectures -FUZZER_CRATE := $(S)src/fuzzer/fuzzer.rc -FUZZER_INPUTS := $(wildcard $(addprefix $(S)src/fuzzer/, *.rs)) +TOOL_DRIVER := $(S)src/driver/driver.rs + +FUZZER_LIB := $(S)src/libfuzzer/fuzzer.rc +FUZZER_INPUTS := $(wildcard $(addprefix $(S)src/libfuzzer/, *.rs)) # The test runner that runs the cfail/rfail/rpass and bench tests COMPILETEST_CRATE := $(S)src/compiletest/compiletest.rc COMPILETEST_INPUTS := $(wildcard $(S)src/compiletest/*rs) # Cargo, the package manager -CARGO_CRATE := $(S)src/cargo/cargo.rc +CARGO_LIB := $(S)src/libcargo/cargo.rc CARGO_INPUTS := $(wildcard $(S)src/cargo/*rs) # Rustdoc, the documentation tool -RUSTDOC_CRATE := $(S)src/rustdoc/rustdoc.rc +RUSTDOC_LIB := $(S)src/librustdoc/rustdoc.rc RUSTDOC_INPUTS := $(wildcard $(S)src/rustdoc/*.rs) # FIXME: These are only built for the host arch. Eventually we'll # have tools that need to built for other targets. define TOOLS_STAGE_N -$$(TBIN$(1)_T_$(4)_H_$(3))/fuzzer$$(X): \ - $$(FUZZER_CRATE) $$(FUZZER_INPUTS) \ +$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBFUZZER): \ + $$(FUZZER_LIB) $$(FUZZER_INPUTS) \ $$(TSREQ$(1)_T_$(4)_H_$(3)) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTC) @$$(call E, compile_and_link: $$@) - $$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< + $$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@ + +$$(TBIN$(1)_T_$(4)_H_$(3))/fuzzer$$(X): \ + $$(TOOL_DRIVER) \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBFUZZER) + @$$(call E, compile_and_link: $$@) + $$(STAGE$(1)_T_$(4)_H_$(3)) --cfg fuzzer -o $$@ $$< # Promote the stageN target to stageN+1 host # FIXME: Shouldn't need to depend on host/librustc.so once # rpath is working +$$(HLIB$(2)_H_$(4))/$$(CFG_LIBFUZZER): \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBFUZZER) \ + $$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC) \ + $$(HSREQ$(2)_H_$(4)) + @$$(call E, cp: $$@) + $$(Q)cp $$< $$@ + $$(HBIN$(2)_H_$(4))/fuzzer$$(X): \ $$(TBIN$(1)_T_$(4)_H_$(3))/fuzzer$$(X) \ - $$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC) \ + $$(HLIB$(2)_H_$(4))/$$(CFG_LIBFUZZER) \ $$(HSREQ$(2)_H_$(4)) @$$(call E, cp: $$@) $$(Q)cp $$< $$@ @@ -53,32 +68,60 @@ $$(HBIN$(2)_H_$(4))/compiletest$$(X): \ @$$(call E, cp: $$@) $$(Q)cp $$< $$@ -$$(TBIN$(1)_T_$(4)_H_$(3))/cargo$$(X): \ - $$(CARGO_CRATE) $$(CARGO_INPUTS) \ +$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBCARGO): \ + $$(CARGO_LIB) $$(CARGO_INPUTS) \ $$(TSREQ$(1)_T_$(4)_H_$(3)) \ - $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \ - $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTC) @$$(call E, compile_and_link: $$@) - $$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< + $$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@ -$$(HBIN$(2)_H_$(4))/cargo$$(X): \ - $$(TBIN$(1)_T_$(4)_H_$(3))/cargo$$(X) \ +$$(TBIN$(1)_T_$(4)_H_$(3))/cargo$$(X): \ + $$(TOOL_DRIVER) \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBCARGO) + @$$(call E, compile_and_link: $$@) + $$(STAGE$(1)_T_$(4)_H_$(3)) --cfg cargo -o $$@ $$< + +$$(HLIB$(2)_H_$(4))/$$(CFG_LIBCARGO): \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBCARGO) \ + $$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC) \ $$(HSREQ$(2)_H_$(4)) @$$(call E, cp: $$@) $$(Q)cp $$< $$@ -$$(TBIN$(1)_T_$(4)_H_$(3))/rustdoc$$(X): \ - $$(RUSTDOC_CRATE) $$(RUSTDOC_INPUTS) \ +$$(HBIN$(2)_H_$(4))/cargo$$(X): \ + $$(TBIN$(1)_T_$(4)_H_$(3))/cargo$$(X) \ + $$(HLIB$(2)_H_$(4))/$$(CFG_LIBCARGO) \ + $$(HSREQ$(2)_H_$(4)) + @$$(call E, cp: $$@) + $$(Q)cp $$< $$@ + +$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTDOC): \ + $$(RUSTDOC_LIB) $$(RUSTDOC_INPUTS) \ $$(TSREQ$(1)_T_$(4)_H_$(3)) \ - $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \ - $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \ $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTC) @$$(call E, compile_and_link: $$@) - $$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< + $$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@ + +$$(TBIN$(1)_T_$(4)_H_$(3))/rustdoc$$(X): \ + $$(TOOL_DRIVER) \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTDOC) + @$$(call E, compile_and_link: $$@) + $$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rustdoc -o $$@ $$< + +$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTDOC): \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTDOC) \ + $$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC) \ + $$(HSREQ$(2)_H_$(4)) + @$$(call E, cp: $$@) + $$(Q)cp $$< $$@ $$(HBIN$(2)_H_$(4))/rustdoc$$(X): \ $$(TBIN$(1)_T_$(4)_H_$(3))/rustdoc$$(X) \ + $$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTDOC) \ $$(HSREQ$(2)_H_$(4)) @$$(call E, cp: $$@) $$(Q)cp $$< $$@ diff --git a/src/driver/driver.rs b/src/driver/driver.rs new file mode 100644 index 00000000000..5faec1855c7 --- /dev/null +++ b/src/driver/driver.rs @@ -0,0 +1,13 @@ +#[no_core]; +extern mod core(vers = "0.5"); + +#[cfg(cargo)] +extern mod self(name = "cargo", vers = "0.5"); + +#[cfg(fuzzer)] +extern mod self(name = "fuzzer", vers = "0.5"); + +#[cfg(rustdoc)] +extern mod self(name = "rustdoc", vers = "0.5"); + +fn main() { self::main() } \ No newline at end of file diff --git a/src/cargo/cargo.rc b/src/libcargo/cargo.rc similarity index 97% rename from src/cargo/cargo.rc rename to src/libcargo/cargo.rc index 76c15146310..184deba04ca 100644 --- a/src/cargo/cargo.rc +++ b/src/libcargo/cargo.rc @@ -14,7 +14,7 @@ uuid = "9ff87a04-8fed-4295-9ff8-f99bb802650b", url = "https://github.com/mozilla/rust/tree/master/src/cargo")]; -#[crate_type = "bin"]; +#[crate_type = "lib"]; #[no_core]; #[legacy_exports]; diff --git a/src/cargo/cargo.rs b/src/libcargo/cargo.rs similarity index 100% rename from src/cargo/cargo.rs rename to src/libcargo/cargo.rs diff --git a/src/cargo/pgp.rs b/src/libcargo/pgp.rs similarity index 100% rename from src/cargo/pgp.rs rename to src/libcargo/pgp.rs diff --git a/src/cargo/sources.json b/src/libcargo/sources.json similarity index 100% rename from src/cargo/sources.json rename to src/libcargo/sources.json diff --git a/src/fuzzer/ast_match.rs b/src/libfuzzer/ast_match.rs similarity index 100% rename from src/fuzzer/ast_match.rs rename to src/libfuzzer/ast_match.rs diff --git a/src/fuzzer/cycles.rs b/src/libfuzzer/cycles.rs similarity index 100% rename from src/fuzzer/cycles.rs rename to src/libfuzzer/cycles.rs diff --git a/src/fuzzer/fuzzer.rc b/src/libfuzzer/fuzzer.rc similarity index 62% rename from src/fuzzer/fuzzer.rc rename to src/libfuzzer/fuzzer.rc index c4d37d90434..11456ba3e1a 100644 --- a/src/fuzzer/fuzzer.rc +++ b/src/libfuzzer/fuzzer.rc @@ -1,7 +1,13 @@ // -*- rust -*- -#[crate_type = "bin"]; +#[link(name = "fuzzer", + vers = "0.5", + uuid = "d6418797-2736-4833-bd82-d3c684b7c1b0", + url = "https://github.com/mozilla/rust/tree/master/src/libfuzzer")]; +#[comment = "The Rust fuzzer library"]; +#[license = "MIT"]; +#[crate_type = "lib"]; #[no_core]; #[legacy_modes]; diff --git a/src/fuzzer/fuzzer.rs b/src/libfuzzer/fuzzer.rs similarity index 100% rename from src/fuzzer/fuzzer.rs rename to src/libfuzzer/fuzzer.rs diff --git a/src/fuzzer/ivec_fuzz.rs b/src/libfuzzer/ivec_fuzz.rs similarity index 100% rename from src/fuzzer/ivec_fuzz.rs rename to src/libfuzzer/ivec_fuzz.rs diff --git a/src/fuzzer/rand_util.rs b/src/libfuzzer/rand_util.rs similarity index 100% rename from src/fuzzer/rand_util.rs rename to src/libfuzzer/rand_util.rs diff --git a/src/rustdoc/astsrv.rs b/src/librustdoc/astsrv.rs similarity index 100% rename from src/rustdoc/astsrv.rs rename to src/librustdoc/astsrv.rs diff --git a/src/rustdoc/attr_parser.rs b/src/librustdoc/attr_parser.rs similarity index 100% rename from src/rustdoc/attr_parser.rs rename to src/librustdoc/attr_parser.rs diff --git a/src/rustdoc/attr_pass.rs b/src/librustdoc/attr_pass.rs similarity index 100% rename from src/rustdoc/attr_pass.rs rename to src/librustdoc/attr_pass.rs diff --git a/src/rustdoc/config.rs b/src/librustdoc/config.rs similarity index 100% rename from src/rustdoc/config.rs rename to src/librustdoc/config.rs diff --git a/src/rustdoc/demo.rs b/src/librustdoc/demo.rs similarity index 100% rename from src/rustdoc/demo.rs rename to src/librustdoc/demo.rs diff --git a/src/rustdoc/desc_to_brief_pass.rs b/src/librustdoc/desc_to_brief_pass.rs similarity index 100% rename from src/rustdoc/desc_to_brief_pass.rs rename to src/librustdoc/desc_to_brief_pass.rs diff --git a/src/rustdoc/doc.rs b/src/librustdoc/doc.rs similarity index 100% rename from src/rustdoc/doc.rs rename to src/librustdoc/doc.rs diff --git a/src/rustdoc/escape_pass.rs b/src/librustdoc/escape_pass.rs similarity index 100% rename from src/rustdoc/escape_pass.rs rename to src/librustdoc/escape_pass.rs diff --git a/src/rustdoc/extract.rs b/src/librustdoc/extract.rs similarity index 100% rename from src/rustdoc/extract.rs rename to src/librustdoc/extract.rs diff --git a/src/rustdoc/fold.rs b/src/librustdoc/fold.rs similarity index 100% rename from src/rustdoc/fold.rs rename to src/librustdoc/fold.rs diff --git a/src/rustdoc/markdown_index_pass.rs b/src/librustdoc/markdown_index_pass.rs similarity index 100% rename from src/rustdoc/markdown_index_pass.rs rename to src/librustdoc/markdown_index_pass.rs diff --git a/src/rustdoc/markdown_pass.rs b/src/librustdoc/markdown_pass.rs similarity index 100% rename from src/rustdoc/markdown_pass.rs rename to src/librustdoc/markdown_pass.rs diff --git a/src/rustdoc/markdown_writer.rs b/src/librustdoc/markdown_writer.rs similarity index 100% rename from src/rustdoc/markdown_writer.rs rename to src/librustdoc/markdown_writer.rs diff --git a/src/rustdoc/page_pass.rs b/src/librustdoc/page_pass.rs similarity index 100% rename from src/rustdoc/page_pass.rs rename to src/librustdoc/page_pass.rs diff --git a/src/rustdoc/parse.rs b/src/librustdoc/parse.rs similarity index 100% rename from src/rustdoc/parse.rs rename to src/librustdoc/parse.rs diff --git a/src/rustdoc/pass.rs b/src/librustdoc/pass.rs similarity index 100% rename from src/rustdoc/pass.rs rename to src/librustdoc/pass.rs diff --git a/src/rustdoc/path_pass.rs b/src/librustdoc/path_pass.rs similarity index 100% rename from src/rustdoc/path_pass.rs rename to src/librustdoc/path_pass.rs diff --git a/src/rustdoc/prune_hidden_pass.rs b/src/librustdoc/prune_hidden_pass.rs similarity index 100% rename from src/rustdoc/prune_hidden_pass.rs rename to src/librustdoc/prune_hidden_pass.rs diff --git a/src/rustdoc/prune_private_pass.rs b/src/librustdoc/prune_private_pass.rs similarity index 100% rename from src/rustdoc/prune_private_pass.rs rename to src/librustdoc/prune_private_pass.rs diff --git a/src/rustdoc/rustdoc.rc b/src/librustdoc/rustdoc.rc similarity index 98% rename from src/rustdoc/rustdoc.rc rename to src/librustdoc/rustdoc.rc index e8f0ec00545..3f71fe4cd9f 100644 --- a/src/rustdoc/rustdoc.rc +++ b/src/librustdoc/rustdoc.rc @@ -7,7 +7,7 @@ #[comment = "The Rust documentation generator"]; #[license = "MIT"]; -#[crate_type = "bin"]; +#[crate_type = "lib"]; #[no_core]; #[legacy_modes]; diff --git a/src/rustdoc/rustdoc.rs b/src/librustdoc/rustdoc.rs similarity index 100% rename from src/rustdoc/rustdoc.rs rename to src/librustdoc/rustdoc.rs diff --git a/src/rustdoc/sectionalize_pass.rs b/src/librustdoc/sectionalize_pass.rs similarity index 100% rename from src/rustdoc/sectionalize_pass.rs rename to src/librustdoc/sectionalize_pass.rs diff --git a/src/rustdoc/sort_item_name_pass.rs b/src/librustdoc/sort_item_name_pass.rs similarity index 100% rename from src/rustdoc/sort_item_name_pass.rs rename to src/librustdoc/sort_item_name_pass.rs diff --git a/src/rustdoc/sort_item_type_pass.rs b/src/librustdoc/sort_item_type_pass.rs similarity index 100% rename from src/rustdoc/sort_item_type_pass.rs rename to src/librustdoc/sort_item_type_pass.rs diff --git a/src/rustdoc/sort_pass.rs b/src/librustdoc/sort_pass.rs similarity index 100% rename from src/rustdoc/sort_pass.rs rename to src/librustdoc/sort_pass.rs diff --git a/src/rustdoc/text_pass.rs b/src/librustdoc/text_pass.rs similarity index 100% rename from src/rustdoc/text_pass.rs rename to src/librustdoc/text_pass.rs diff --git a/src/rustdoc/trim_pass.rs b/src/librustdoc/trim_pass.rs similarity index 100% rename from src/rustdoc/trim_pass.rs rename to src/librustdoc/trim_pass.rs diff --git a/src/rustdoc/tystr_pass.rs b/src/librustdoc/tystr_pass.rs similarity index 100% rename from src/rustdoc/tystr_pass.rs rename to src/librustdoc/tystr_pass.rs diff --git a/src/rustdoc/unindent_pass.rs b/src/librustdoc/unindent_pass.rs similarity index 100% rename from src/rustdoc/unindent_pass.rs rename to src/librustdoc/unindent_pass.rs