From a52c547d0e16121622b7379c383f3209eed67269 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 2 Aug 2018 18:38:30 -0700 Subject: [PATCH] Rename "meta" back to "cranelift-codegen-meta" and publish it. It appears that having the meta directory crate be inside the codegen directory is not enough to allow codegen to depend on it without it being published. So, let's just publish it. --- lib/codegen/Cargo.toml | 2 +- lib/codegen/build.rs | 11 +++++------ lib/codegen/meta/Cargo.toml | 12 +++++++----- lib/codegen/meta/README.md | 2 ++ 4 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 lib/codegen/meta/README.md diff --git a/lib/codegen/Cargo.toml b/lib/codegen/Cargo.toml index 3cc06a1f62..f49fe9caab 100644 --- a/lib/codegen/Cargo.toml +++ b/lib/codegen/Cargo.toml @@ -22,7 +22,7 @@ target-lexicon = { version = "0.0.3", default-features = false } # accomodated in `tests`. [build-dependencies] -meta = { path = "meta", version = "0.0.0" } +cranelift-codegen-meta = { path = "meta" } [features] # The "std" feature enables use of libstd. The "core" feature enables use diff --git a/lib/codegen/build.rs b/lib/codegen/build.rs index 5c88f63fa3..92770e9b16 100644 --- a/lib/codegen/build.rs +++ b/lib/codegen/build.rs @@ -18,7 +18,7 @@ // The build script expects to be run from the directory where this build.rs file lives. The // current directory is used to find the sources. -extern crate meta; +extern crate cranelift_codegen_meta as meta; use std::env; use std::process; @@ -80,11 +80,10 @@ fn main() { // Now that the Python build process is complete, generate files that are // emitted by the `meta` crate. // ------------------------------------------------------------------------ - // Temporarily disable this while we work out how to publish this crate. - //if let Err(err) = meta::gen_types::generate("new_types.rs", &out_dir) { - // eprintln!("Error: {}", err); - // process::exit(1); - //} + if let Err(err) = meta::gen_types::generate("new_types.rs", &out_dir) { + eprintln!("Error: {}", err); + process::exit(1); + } } fn identify_python() -> &'static str { diff --git a/lib/codegen/meta/Cargo.toml b/lib/codegen/meta/Cargo.toml index 17dfd1ce7c..0a9f294642 100644 --- a/lib/codegen/meta/Cargo.toml +++ b/lib/codegen/meta/Cargo.toml @@ -1,10 +1,12 @@ [package] -name = "meta" +name = "cranelift-codegen-meta" authors = ["The Cranelift Project Developers"] -version = "0.0.0" +version = "0.18.0" description = "Metaprogram for cranelift-codegen code generator library" license = "Apache-2.0 WITH LLVM-exception" -documentation = "https://cranelift.readthedocs.io/" repository = "https://github.com/CraneStation/cranelift" -keywords = ["compile", "compiler", "jit"] -publish = false +readme = "README.md" + +[badges] +maintenance = { status = "experimental" } +travis-ci = { repository = "CraneStation/cranelift" } diff --git a/lib/codegen/meta/README.md b/lib/codegen/meta/README.md new file mode 100644 index 0000000000..c0c8648b29 --- /dev/null +++ b/lib/codegen/meta/README.md @@ -0,0 +1,2 @@ +This crate contains the metaprogram used by cranelift-codegen. It's not +useful on its own.