On Thu, Mar 15, 2018, at 7:22 AM, Henri Sivonen wrote: > Do we have a way to read the prerequisite data for MOZ_GTEST_BENCH > outside MOZ_GTEST_BENCH so that the disk IO doesn't get timed?
I don't know that we have any stock way to do this. I can offer three plausible solutions: 1) If putting the data in a Rust crate is feasible, use `include_bytes!` in the toolkit/library/gtest/rust crate[1], which gets linked into the gtest libxul. 2) Write a `GENERATED_FILES` script that takes the data file and outputs a header with a C array of bytes and #include that in the GTest. 3) Not the best solution, but for ICU data I have yasm / gas assembly files[2] that include the ICU .dat as a symbol. 1. https://dxr.mozilla.org/mozilla-central/source/toolkit/library/gtest/rust/lib.rs 2. https://dxr.mozilla.org/mozilla-central/source/config/external/icu/data _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform