Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1147)

Issue 6214063: [ASan] Make for-Windows RTL compileable using Clang++

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 11 months ago by timurrrr_at_google_com
Modified:
11 years, 11 months ago
Reviewers:
kcc1, anton
CC:
llvm-commits_cs.uiuc.edu
Visibility:
Public.

Description

Make ASan/RTL compileable using Clang++ on Windows

Patch Set 1 #

Patch Set 2 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -17 lines) Patch
M lib/asan/asan_allocator.cc View 3 chunks +9 lines, -9 lines 0 comments Download
M lib/asan/asan_internal.h View 2 chunks +16 lines, -7 lines 0 comments Download
M lib/asan/asan_win.cc View 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 8
timurrrr_at_google_com
Hi Kostya, Can you please review this small patch? Please note it might not be ...
11 years, 11 months ago (2012-05-21 13:56:12 UTC) #1
kcc1
Looks good. On 2012/05/21 13:56:12, timurrrr_at_google_com wrote: > Hi Kostya, > > Can you please ...
11 years, 11 months ago (2012-05-21 14:01:32 UTC) #2
anton_korobeynikov.info
Hi Timur, > -#ifdef _WIN32 > +#if defined(_WIN32) && !defined(__clang__) > #include <intrin.h> > #endif ...
11 years, 11 months ago (2012-05-21 14:03:56 UTC) #3
timurrrr_at_google_com
Anton, On Mon, May 21, 2012 at 6:03 PM, Anton Korobeynikov <anton@korobeynikov.info> wrote: >> -#ifdef ...
11 years, 11 months ago (2012-05-21 14:07:21 UTC) #4
kcc1
On Mon, May 21, 2012 at 6:03 PM, Anton Korobeynikov <anton@korobeynikov.info > wrote: > Hi ...
11 years, 11 months ago (2012-05-21 14:07:45 UTC) #5
timurrrr_at_google_com
Committed as r157188. If we eventually find out the approach is wrong, I'll fix it ...
11 years, 11 months ago (2012-05-21 14:27:25 UTC) #6
anton_korobeynikov.info
Timur, > On Mon, May 21, 2012 at 6:03 PM, Anton Korobeynikov > <anton@korobeynikov.info> wrote: ...
11 years, 11 months ago (2012-05-21 14:27:35 UTC) #7
timurrrr_at_google_com
11 years, 11 months ago (2012-05-21 14:29:39 UTC) #8
On Mon, May 21, 2012 at 6:27 PM, Anton Korobeynikov
<anton@korobeynikov.info> wrote:
> Timur,
>
>> On Mon, May 21, 2012 at 6:03 PM, Anton Korobeynikov
>> <anton@korobeynikov.info> wrote:
>>>> -#ifdef _WIN32
>>>> +#if defined(_WIN32) && !defined(__clang__)
>>>>  #include <intrin.h>
>>>>  #endif
>>> I think it should check for _MSC_VER here instead. And in many other
>>> places as well.
>> Clang defines _MSC_VER on Windows:
>> $ clang++ -dM -E -xc empty | grep MSC
>> #define _MSC_EXTENSIONS 1
>> #define _MSC_VER 1300
>
> Ok, it seems that the following scenarios are possible:
>
> 1. clang on non-windows (or gcc, this should not matter, in theory)
> 2. clang on windows with ms extensions enabled
> 3. clang on windows w/o ms extensions enabled
> 4. MS VC on windows
>
> For me it seems you're trying to "unify" 4 and 2 in MS-way - with
> confusing defines (_WIN32 defined in _WIN64 mode as well), etc. The 3
> as it seems to me is not supported as well.
Right.
We only want to support 2 and 4 for now.

> It's surely up to you, but maybe there is better way to untangle all
> the mess? For example, LLVM itself has portability layer which seems
> to contain bunch of stuff you're using in asan.
> Maybe you can consider looking there and "steal" some design ideas
> from there? Check e.g. Support/DataTypes.h, Support/MathExtras.h,
> etc...
>
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b