-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binaries
Description
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
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binaries
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
nodakai commentedon Nov 13, 2014
I think the
u
option given toar
doesn't examine timestamps with sub-second accuracy and thus sometimes ignores the new object file.rustc_back: Don't pass 'u' to ar invocations
rustc_back: Don't pass 'u' to ar invocations
Auto merge of #25411 - alexcrichton:issue-18913, r=brson
rustc_back: Don't pass 'u' to ar invocations
Stop shuffling output files around so often
Merge pull request rust-lang#18913 from Wilfred/grammar_fix