Why is mangling different for separate compilation?
Joakim via Digitalmars-d
digitalmars-d at puremagic.com
Sat Feb 27 03:27:11 PST 2016
On Saturday, 27 February 2016 at 10:56:08 UTC, Atila Neves wrote:
> On Saturday, 27 February 2016 at 10:18:53 UTC, Joakim wrote:
>> On Saturday, 27 February 2016 at 09:11:02 UTC, Atila Neves
>> wrote:
>>> On Saturday, 27 February 2016 at 03:51:00 UTC, Walter Bright
>>> wrote:
>>>> On 2/26/2016 4:45 AM, Atila Neves wrote:
>>>>> '_D3bar16__unittestL2_531FZv'
>>>>> '_D3bar14__unittestL2_1FZv'
>>>>
>>>> It uses a sequence number to generate different ids for the
>>>> unit tests. In the former, it's the 531st unit test, the
>>>> latter, the first.
>>>
>>> In both cases though, there's only one unit test. The only
>>> difference is how the files were compiled.
>>
>> 531 is the number across all modules, because they weren't
>> separately compiled.
>
> Which "all modules"? Phobos? druntime? The only `import` in
> that code is `import bar;`.
Oh, I didn't read your previous posts carefully, I thought the
531 was from compiling everything together, but it looks it's
from separate compilation. I guess it's generating a different
number from somewhere else.
What I know is that when I tried to separately compile druntime
and phobos and use getUnitTests in the test runner, dmd would get
confused because it would increment that number across all
modules in the test runner (also the ordering of imported modules
would matter), but the separately compiled modules unittests'
would have much smaller numbers in their mangling.
I'm guessing you're hitting some other version of the same
problem with your example, though the underlying reason you're
getting 531 might be different.
More information about the Digitalmars-d
mailing list