[FFmpeg-devel] [PATCH] configure: fix clang-cl detection

Hendrik Leppkes h.leppkes at gmail.com
Thu Apr 19 17:28:57 EEST 2018


On Thu, Apr 19, 2018 at 4:21 PM, Derek Buitenhuis
<derek.buitenhuis at gmail.com> wrote:
> On 4/18/2018 9:27 AM, Timo Rothenpieler wrote:
>> On 18.04.2018 10:05, Wang Bin wrote:
>>>>
>>>>
>>>> -    elif $_cc -nologo- 2>&1 | grep -q Microsoft; then
>>>> +    elif $_cc -nologo- 2>&1 | grep -q Microsoft || $_cc -v 2>&1 | grep -q
>>>> clang && $_cc -? > /dev/null 2>&1; then
>>>>          _type=msvc
>>>>          _ident=$($_cc 2>&1 | head -n1)
>>>>          _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 |
>>>> awk '\''/including/ { sub(/^.*file: */, ""); gsub(/\\/, "/"); if
>>>> (!match($$0, / /)) print "$@:", $$0 }'\'' > $(@:.o=.d)'
>>>>
>>>>
>>> This breaks msvc build because msys's link.exe is tested instead of mslink
>>> script
>>
>> Sounds more like an issue with your build environment to me? Make sure
>> the msvc build tools take precedence in your PATH.
>
> I believe Wang is correct, it should be checking mslink, which is our own script
> specifically to wrap link.exe.
>
> See compat/windows/mslink and its history.
>

--toolchain=msvc also sets mslink as ld_default, unless you override
that on the commandline or didn't use --toolchain at all, I'm not sure
how link.exe would otherwise ever factor into there.
There is no other magic to redirect link.exe to mslink, only
--toolchain sets that.

- Hendrik


More information about the ffmpeg-devel mailing list