[llvm-dev] Options not found when compile OpenSSL with clang
I am developing an LLVM pass. To keep the project lightweight, I compiled the pass to .so and add "-Xclang -load -Xclang /path/to/.so -mllvm my-pass-options" to CFLAGS. I tested it on OpenSSL, it worked fine with those .c files but failed on compiling an assembly file (.s). The error messages showed that it could not find the options I defined in the pass. I think that's because clang does not load an external pass for .s files, so it won't find external pass options I put in "-mllvm my-pass-options". However, in the OpenSSL's makefile, FLAGS for compiling .c files and .s files are the same, which means I cannot use different FLAGS for compiling .s files easily (or I need to change lots of lines of OpenSSL's makefile which is not recommended). So here is my question, is there any way to use my external pass with customed options in OpenSSL without changing its makefile a lot? (i.e. FLAGS work fine with both .c and .s files).
One solution I know is putting the pass in LLVM source code directory and compile the whole project, then use the clang compiled from that directory. However, I think it is not user-friendly to do that.