[PATCH] D63194: [clangd] Link and initialize target infos

Filipe Cabecinhas via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 14 05:21:46 PDT 2020


Hi Kadir,

Thank you for looking into this.
Unfortunately, I can't repro this anymore. I wonder if I had a weird stale
clangd or something. Current test (now changed to armv7) does set the
target properly. When I tried last time, it wasn't setting it, and was
defaulting to my system's (darwin).

Thank you,
  Filipe


On Sat, Apr 11, 2020 at 5:20 PM Kadir Çetinkaya <kadircet at google.com> wrote:

> Hi Filipe! Thanks for letting me know, I've sent
> https://reviews.llvm.org/D77944 to enable this in clangd lit config.
>
> Regarding the failure, I can't seem to repro on machines I have access to.
> The premerge-tests also seems to be succeeding, please see
> https://results.llvm-merge-guard.org/BETA_amd64_debian_testing_clang8-626/console-log.txt
> .
>
> Can you provide more info about how you've ran the test?
>
> On Fri, Apr 10, 2020 at 4:23 PM Filipe Cabecinhas <filcab at gmail.com>
> wrote:
>
>> Hi Kadir,
>>
>> Can you fix the target_info.test clangd test you committed in this
>> revision, please?
>> I see you've tried fixing it later by adding `REQUIRES:
>> x86-registered-target`, but now it's never running because that feature
>> isn't (ever) set.
>> Here's a buildbot run showing it as unsupported (x86 target is built):
>> http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/26746/steps/test-check-all/logs/stdio
>>
>> I saw you tried to fix the test in r364413 ([clangd] Disable failing
>> unittest on non-x86 platforms) because it was always failing. The problem
>> is that, even though the feature check is needed, the test still isn't
>> working well. I just ran it manually and didn't get the target changed from
>> my host one.
>>
>> Here's a diff for the feature check that you can apply to propagate the
>> feature. But we still need to get the clangd code fixed so it picks up the
>> target:
>>
>> ```
>> diff --git a/clang-tools-extra/clangd/test/lit.cfg.py
>> b/clang-tools-extra/clangd/test/lit.cfg.py
>> index 5030ca356ef..54406498af0 100644
>> --- a/clang-tools-extra/clangd/test/lit.cfg.py
>> +++ b/clang-tools-extra/clangd/test/lit.cfg.py
>> @@ -3,6 +3,19 @@ import lit.llvm
>>  lit.llvm.initialize(lit_config, config)
>>  lit.llvm.llvm_config.use_clang()
>>
>> +# required for target_info.test
>> +def calculate_arch_features(arch_string):
>> +    features = []
>> +    for arch in arch_string.split():
>> +        features.append(arch.lower() + '-registered-target')
>> +    return features
>> +
>> +lit.llvm.llvm_config.feature_config(
>> +    [('--assertion-mode', {'ON': 'asserts'}),
>> +     ('--cxxflags', {r'-D_GLIBCXX_DEBUG\b': 'libstdcxx-safe-mode'}),
>> +     ('--targets-built', calculate_arch_features)
>> +     ])
>> +
>>  config.name = 'Clangd'
>>  config.suffixes = ['.test']
>>  config.excludes = ['Inputs']
>> ```
>>
>> Thank you,
>>
>>   Filipe
>>
>>   Filipe
>>
>>
>> On Wed, Jun 26, 2019 at 8:48 AM Kadir Cetinkaya via Phabricator via
>> cfe-commits <cfe-commits at lists.llvm.org> wrote:
>>
>>> kadircet closed this revision.
>>> kadircet added a comment.
>>>
>>> Landed as rL364387 <https://reviews.llvm.org/rL364387>
>>>
>>>
>>> Repository:
>>>   rG LLVM Github Monorepo
>>>
>>> CHANGES SINCE LAST ACTION
>>>   https://reviews.llvm.org/D63194/new/
>>>
>>> https://reviews.llvm.org/D63194
>>>
>>>
>>>
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at lists.llvm.org
>>> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200414/0fd3a83d/attachment.html>


More information about the cfe-commits mailing list