Skip to content

Compiler doesn't actually write output if rerun quickly #18913

Closed
@alexcrichton

Description

@alexcrichton

I have a suspicion that we're not calling ar correctly if an rlib previously existed. This script, for example, prints 0 both times:

echo 'extern crate foo; fn main() { println!("{}", foo::foo()); }' > bar.rs
echo 'pub fn foo() -> int { 0 }' > foo.rs
rustc foo.rs --crate-type lib
rustc bar.rs -L .
./bar

echo 'pub fn foo() -> int { 1 }' > foo.rs
rustc foo.rs --crate-type lib
rustc bar.rs -L .
./bar

If I insert sleep 1 in the middle, this prints 0/1 always, and when run repeatedly it will intermittently print 0/1. I'm currently running this on linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binaries

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions