<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Using /EHsc or /EHsc- results in a missing symbol"
   href="https://llvm.org/bugs/show_bug.cgi?id=25473">25473</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Using /EHsc or /EHsc- results in a missing symbol
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ismail@i10z.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=15257" name="attach_15257" title="Testcase">attachment 15257</a> <a href="attachment.cgi?id=15257&action=edit" title="Testcase">[details]</a></span>
Testcase

Using clang r252597 win64. Using the attached test program:

λ clang-cl checksec.cpp
λ

Works fine, now lets see /EHsc:

λ clang-cl /EHsc checksec.cpp
checksec-649d19.obj : error LNK2019: unresolved external symbol "void __cdecl
terminate(void)" (?terminate@@YAXXZ) referenced in function "int `public:
__cdecl MappedImage::~MappedImage(void)'::`1'::dtor$10"
(?dtor$10@?0???1MappedImage@@QEAA@XZ@4HA)
checksec.exe : fatal error LNK1120: 1 unresolved externals
clang-cl.exe: error: linker command failed with exit code 1120 (use -v to see
invocation)

Ok then use /EHsc- :

λ clang-cl /EHsc- checksec.cpp
checksec-280639.obj : error LNK2019: unresolved external symbol "void __cdecl
terminate(void)" (?terminate@@YAXXZ) referenced in function "int `public:
__cdecl MappedImage::~MappedImage(void)'::`1'::dtor$10"
(?dtor$10@?0???1MappedImage@@QEAA@XZ@4HA)
checksec.exe : fatal error LNK1120: 1 unresolved externals
clang-cl.exe: error: linker command failed with exit code 1120 (use -v to see
invocation)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>