Skip to content

Clang crashing with invalid llvm.linker.options on encountering detect_mismatch pragma #1149

Closed
@pendyalasyam

Description

@pendyalasyam

I have a sample program test.cpp where it contains detect_mismatch pragma. While compiling this file with NDK r21 beta2's clang, it seems clang is crashing

test.cpp

#pragma detect_mismatch("Property", "Value")
extern void print();
void function()
{
print();
}

Command

ndk21\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe -cc1 -triple i686-none-linux-android -emit-obj -fms-extensions test.cpp

Output

fatal error: error in backend: invalid llvm.linker.options
Stack dump:
0. Program arguments: ndk21\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe -cc1 -triple i686-none-linux-android -emit-obj -fms-extensions -x c++ test.cpp

  1.  <eof> parser at end of file
    
  2.  Code generation
    

If I remove any of the compiler options (-emit-obj/-fms-extensions/-triple), it is getting compiled with out any issues.

Could you please help check why it is crashing.

Environment Details

  • NDK Version: R21 beta2
  • Build system: Custom
  • Host OS: Windows

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions