Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for latest rust nightly. #10

Merged
merged 2 commits into from
Feb 11, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions cargo-lite
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ def build(args, conf):
b = conf['build']
if 'crate_root' in b:
crate_root = os.path.abspath(b['crate_root'])
output = rustc("--crate-file-name", "--rlib", "--staticlib", "--dylib", crate_root, _iter=True)
out_dir = os.path.dirname(crate_root)
output = rustc("--crate-file-name", "--crate-type=rlib", "--crate-type=staticlib", "--crate-type=dylib", crate_root, _iter=True)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can, and should, be --crate-type=rlib,staticlib,dylib

if output.exit_code != 0:
sys.stderr.write("--crate-file-name failed, status {}, stderr:\n".format(output.exit_code))
sys.stderr.write(str(output))
Expand All @@ -155,11 +156,13 @@ def build(args, conf):

args = b.get('rustc_args', [])
args.append(crate_root)
args.append("--rlib")
args.append("--staticlib")
args.append("--dylib")
args.append("--crate-type=rlib")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and soforth

args.append("--crate-type=staticlib")
args.append("--crate-type=dylib")
args.append("-L")
args.append(libdir())
args.append("--out-dir")
args.append(out_dir)
output = rustc(*args)

if output.exit_code != 0:
Expand Down Expand Up @@ -225,9 +228,9 @@ def buildcmd(args):
args.append(b["crate_root"])
args.append("-L")
args.append(libdir())
args.append("--rlib")
args.append("--staticlib")
args.append("--dylib")
args.append("--crate-type=rlib")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and soforth

args.append("--crate-type=staticlib")
args.append("--crate-type=dylib")
success(rustc(*args))
elif "build_cmd" in b:
# TODO: pass it libdir somehow, perhaps in env var?
Expand Down