On Thu, Mar 15, 2018 at 2:51 PM, Ted Mielczarek <t...@mielczarek.org> wrote:
> 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.

All of these involve putting the data inside libxul somehow. The
reason why the data isn't there already is that the data is under a
license that's prohibited in Gecko code. Maybe we just need a policy
opinion that while such data must not be baked into Gecko that gets
distributed but that baking it into a gtest-only binaries is actually
harmless. I'll try to get such a policy opinion.

-- 
Henri Sivonen
hsivo...@hsivonen.fi
https://hsivonen.fi/
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to