[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #25386 [Core Tor/Tor]: Link Rust Tests to C Dependencies in Tor (allow integration testing from Rust to C)



#25386: Link Rust Tests to C Dependencies in Tor (allow integration testing from
Rust to C)
-------------------------------------------------+-------------------------
 Reporter:  Hello71                              |          Owner:  nickm
     Type:  defect                               |         Status:
                                                 |  needs_review
 Priority:  High                                 |      Milestone:  Tor:
                                                 |  0.3.4.x-final
Component:  Core Tor/Tor                         |        Version:  Tor:
                                                 |  0.3.3.1-alpha
 Severity:  Normal                               |     Resolution:
 Keywords:  rust, tor-test, 033-backport,        |  Actual Points:
  review-group-34, 034-triage-20180328,          |
  034-included-20180401                          |
Parent ID:                                       |         Points:  3
 Reviewer:  isis                                 |        Sponsor:
                                                 |  SponsorQ
-------------------------------------------------+-------------------------
Changes (by nickm):

 * status:  assigned => needs_review


Comment:

 I have a variation in `rust_build_script_v3`: It's better documented, and
 it has the tricks necessary to get the sanitizers to work (for me) with
 clang and gcc.

 I was hoping not to need the "linker script" trick, but with clang, it
 turns out to be hard to actually specify "-lclangrt.asan" in a way that
 clang will accept.  I think you might need to list the architecture as
 part of the library's name for that -- so just specifying "static-libasan"
 was indeed easier.  But to pass that to the linker correctly, it needs to
 go near the start of the link line, and for that, we need to have a shell
 script.

 I think we might be needlessly rebuilding our rust modules when we run the
 tests here, because the RUSTFLAGS option is only set when testing. I
 didn't see a way to set RUSTFLAGS from build.rs, but that would be a
 better way around this.

 Note that the tests don't _pass_ yet, but I think that's another ticket.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25386#comment:59>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs