Compilation broken for x86_64-pc-windows-msvc target


Even though its not easy to pinpoint the exact breaking commit, for
the last day or two compilation for win64 target seems to be broken:

[~]> clang++ -target x86_64-pc-windows-msvc -fno-exceptions hello.cpp
fatal error: error in backend: symbol '__ImageBase' can not be
undefined in a subtraction expression

# 32bit compilation works
[~]> clang++ -target x86_64-pc-windows-msvc -fno-exceptions -m32 hello.cpp
[~]> ./a.exe
Hello World!

[~]> clang -v
clang version 3.7.0 (
Target: x86_64-pc-windows-msvc
Thread model: posix

Any ideas?


What does hello.cpp consist of?

Sorry missed that part:

[~]> cat hello.cpp
#include <iostream>

int main()
    std::cout << "Hello World!" << std::endl;
    return 0;

I believe I understand what’s going wrong, I should have a fix later today.

Should be fixed with r231456.

Confirmed fixed, thanks!