[Libclc-dev] [PATCH] Fix build with LLVM 3.4

Aaron Watry awatry at gmail.com
Thu Jul 18 11:14:40 PDT 2013


On Thu, Jul 18, 2013 at 10:00 AM, Tom Stellard <tom at stellard.net> wrote:
> On Thu, Jul 18, 2013 at 08:53:01AM -0500, Aaron Watry wrote:
>> F_Binary and friends were moved to include/Support/FileSystem.h
>>
>> Signed-off-by: Aaron Watry <awatry at gmail.com>
>> ---
>>  utils/prepare-builtins.cpp | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/utils/prepare-builtins.cpp b/utils/prepare-builtins.cpp
>> index be1624b..536359f 100644
>> --- a/utils/prepare-builtins.cpp
>> +++ b/utils/prepare-builtins.cpp
>> @@ -66,7 +66,7 @@ int main(int argc, char **argv) {
>>    std::string ErrorInfo;
>>    OwningPtr<tool_output_file> Out
>>    (new tool_output_file(OutputFilename.c_str(), ErrorInfo,
>> -                        raw_fd_ostream::F_Binary));
>> +                        sys::fs::F_Binary));
>
> I think we should wrap this in an ifdef, so it works with 3.3 and 3.4.
>
> The other question I have is do we even need the prepare-builtin
> program?  All it does is change the linkage to linkonce_odr, I'm not
> sure why we need to do this.
>
> -Tom

I agree about 3.3/3.4 compatibility, v2 is incoming.

For future reference, it looks like the code currently only supports
going back to 3.3, so I guess that can serve as a baseline.

I'm not sure if prepare-builtins is necessary...  I took a look at the
llvm-link command's options, and I don't see anything that we could
use as an easy way to do the same thing, but maybe it's not documented
by 'llvm-link --help'.... or maybe that's the wrong place to do it.
Something for a follow-on patch?

--Aaron

>
>
>>    if (!ErrorInfo.empty()) {
>>      errs() << ErrorInfo << '\n';
>>      exit(1);
>> --
>> 1.8.1.2
>>
>>
>> _______________________________________________
>> Libclc-dev mailing list
>> Libclc-dev at pcc.me.uk
>> http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev




More information about the Libclc-dev mailing list