Sorry, didn't read closely enough. Looks like it's currently ignored:
$ grep -n frandom_seed include/clang/Driver/Options.td
949:def frandom_seed_EQ : Joined<["-"], "frandom-seed=">,
Group;
http://reviews.llvm.org/D3391
On Mon, Aug 24, 2015 at 12:41 PM, Stephan Gatzka
wrote:
> Well,
>
> tha
Well,
that's not exactly what I meant. In gcc, if you use -flto a c file
compiled twice leads to different binaries, if you don't add
-frandom-seed=.
clang also supports the switch -frandom-seed=, but the object
files produced by clang are always binary equal.
Meanwhile I think clang intor
sorry, typo, should be -DSOME_INT=$RANDOM
On Mon, Aug 24, 2015 at 9:28 AM, don hinton wrote:
> You could try something like this:
>
> template
> class X{}
>
> static X x;
>
> // or
>
> char str[SOME_INT];
>
> then compile it like this:
>
> clang++ -D$RANDOM -c file.cpp -o file.o
>
> RANDOM is a
You could try something like this:
template
class X{}
static X 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.
ht