sorry, typo, should be -DSOME_INT=$RANDOM On Mon, Aug 24, 2015 at 9:28 AM, don hinton <hinto...@gmail.com> wrote:
> You could try something like this: > > template <int N> > class X{} > > static X<SOME_INT> x; > > // or > > char str[SOME_INT]; > > then compile it like this: > > clang++ -D$RANDOM -c file.cpp -o file.o > > RANDOM is a bash thing, but basically you just need to generate a random > number each time you compile and pass it in as a macro. > > hth... > don > > On Mon, Aug 24, 2015 at 12:57 AM, Stephan Gatzka via cfe-users < > cfe-users@lists.llvm.org> wrote: > >> Hi! >> >> I just added support for reproducible builds (-frandom-seed=) into the >> qbs build system. >> >> For a automated test case I'd like to have a small snippet of C/C++ >> code, which definitely leads to different object files if compiled >> twice. >> >> I wasn't able to write such a snippet, so any help would be very >> appreciated. >> >> Regards, >> >> Stephan >> _______________________________________________ >> cfe-users mailing list >> cfe-users@lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users >> > >
_______________________________________________ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users