Closed Bug 1022349 Opened 10 years ago Closed 10 years ago

Use the C/C++ compilers passed in through mozconfig in order to preprocess libffi on Windows instead of hardcoding the usage of cl

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla33

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(2 files, 1 obsolete file)

      No description provided.
Assignee: nobody → ehsan
Blocks: winclang
Attachment #8436488 - Flags: review?(mh+mozilla)
Comment on attachment 8436488 [details] [diff] [review]
Use the C/C++ compilers passed in through mozconfig in order to preprocess libffi on Windows instead of hardcoding the usage of cl

This actually breaks clang-cl builds.
Attachment #8436488 - Flags: review?(mh+mozilla)
Filed an LLVM bug to add support for -EP.  This would be trivial to work around by just using -E, except that I also realized that the msvcc.sh script forces usage of cl no matter what the main configure script does.  glandium, can we take a local patch to msvcc.sh?
Flags: needinfo?(mh+mozilla)
(In reply to :Ehsan Akhgari (lagging on bugmail, needinfo? me!) from comment #3)
> glandium, can we take a local patch to msvcc.sh?

We can even upstream it. I don't think upstream would mind, we're essentially the ones maintaining that file.
Flags: needinfo?(mh+mozilla)
Upstream is very friendly towards taking patches. Can you submit a pull request?
Done: https://github.com/atgreen/libffi/pull/123

What's our process of taking upstream changes for libffi?
We can just land it locally for now with an in-tree patch and grab the upstream update whenever.
Attachment #8436488 - Attachment is obsolete: true
Attachment #8439617 - Flags: review?(mh+mozilla)
Attachment #8439618 - Flags: review?(mh+mozilla)
(In reply to Ryan VanderMeulen [:RyanVM UTC-4] from comment #7)
> We can just land it locally for now with an in-tree patch and grab the
> upstream update whenever.

glandium asked me to add a local patch to libffi-patches.
Attachment #8439617 - Flags: review?(mh+mozilla) → review+
Comment on attachment 8439618 [details] [diff] [review]
Part 2: Use clang-cl when building libffi if we're building with clang-cl; r=glandium

Review of attachment 8439618 [details] [diff] [review]:
-----------------------------------------------------------------

::: build/autoconf/ffi.m4
@@ +54,5 @@
>        fi
> +      clangcl=
> +      if test -n "$CLANG_CL"; then
> +        clangcl=" -clang-cl"
> +      fi

I'd rather rename rtl and append to it. That'd live a single variable used below instead of adding another one.
Attachment #8439618 - Flags: review?(mh+mozilla) → review+
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: