Ticket #5150 (closed feature request: fixed)

Opened 2 years ago

Last modified 22 months ago

GHC should support -x objective-cpp, as well

Reported by: scpmw Owned by:
Priority: normal Milestone: 7.2.1
Component: Driver Version: 7.0.3
Keywords: Cc:
Operating System: MacOS X Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty:
Test Case: objcpp-hi Blocked By:
Blocking: Related Tickets:

Description

This is a follow-up to #5025: Adding objective-c is just part of the story, as objective-c++ files (with suffix ".mm" or ".M") are also pretty common.  Thoughtpolice even mentioned this in the comments.

As with #5025, this would make compiling for Mac a lot easier without any real complications for GHC, as it only has to pass the file through to GCC with the appropriate flag.

Change History

Changed 2 years ago by scpmw

Shamelessly copying both the code as well as the approach of thoughtpolice... Here are two Github branches that should implement the required functionality, including a testcase:

 https://github.com/scpmw/ghc/tree/objective-cpp  https://github.com/scpmw/testsuite/tree/objective-cpp

Changed 23 months ago by igloo

  • status changed from new to patch
  • milestone set to 7.2.1

Thanks, we'll take a look.

Changed 22 months ago by peter@…

commit e17c1568baf142c2d2ddca4a4b4a7ba5a4ceddca

Author: Peter Wortmann <peter@grayson-heights-pc028-118.student-halls.leeds.ac.uk>
Date:   Fri Apr 22 10:35:35 2011 +0100

    Teach GHC to compile objective-c++ files as well (trac #5150)

 compiler/main/DriverPhases.hs   |    8 +++++++-
 compiler/main/DriverPipeline.hs |    3 ++-
 ghc/Main.hs                     |    2 +-
 3 files changed, 10 insertions(+), 3 deletions(-)

Changed 22 months ago by igloo

  • status changed from patch to closed
  • resolution set to fixed

Applied, thanks

Note: See TracTickets for help on using tickets.