Bug 131333 - Build bmalloc on Mac
Summary: Build bmalloc on Mac
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Geoffrey Garen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-07 17:41 PDT by Geoffrey Garen
Modified: 2014-04-07 22:32 PDT (History)
1 user (show)

See Also:


Attachments
Patch (4.13 KB, patch)
2014-04-07 17:43 PDT, Geoffrey Garen
no flags Details | Formatted Diff | Diff
Patch (6.79 KB, patch)
2014-04-07 17:54 PDT, Geoffrey Garen
no flags Details | Formatted Diff | Diff
Patch (29.42 KB, patch)
2014-04-07 20:27 PDT, Geoffrey Garen
no flags Details | Formatted Diff | Diff
Patch (30.71 KB, patch)
2014-04-07 20:38 PDT, Geoffrey Garen
no flags Details | Formatted Diff | Diff
Patch (31.29 KB, patch)
2014-04-07 22:23 PDT, Geoffrey Garen
mrowe: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffrey Garen 2014-04-07 17:41:52 PDT
Build bmalloc on Mac
Comment 1 Geoffrey Garen 2014-04-07 17:43:50 PDT
Created attachment 228784 [details]
Patch
Comment 2 Andreas Kling 2014-04-07 17:44:24 PDT
Comment on attachment 228784 [details]
Patch

rs=me
Comment 3 Mark Rowe (bdash) 2014-04-07 17:47:51 PDT
Comment on attachment 228784 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=228784&action=review

> Source/bmalloc/bmalloc.xcodeproj/project.pbxproj:346
> +				ALWAYS_SEARCH_USER_PATHS = NO;
> +				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
> +				CLANG_CXX_LIBRARY = "libc++";
> +				CLANG_ENABLE_MODULES = YES;
> +				CLANG_ENABLE_OBJC_ARC = YES;
> +				CLANG_WARN_BOOL_CONVERSION = YES;
> +				CLANG_WARN_CONSTANT_CONVERSION = YES;

This all should live in .xcconfig files and be consistent with our other projects.
Comment 4 Geoffrey Garen 2014-04-07 17:54:06 PDT
Created attachment 228786 [details]
Patch
Comment 5 Mark Rowe (bdash) 2014-04-07 18:10:23 PDT
Comment on attachment 228786 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=228786&action=review

> Source/bmalloc/ChangeLog:22
> +2014-04-07  Geoffrey Garen  <ggaren@apple.com>
> +
> +        Build bmalloc on Mac
> +        https://bugs.webkit.org/show_bug.cgi?id=131333
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        * Makefile: Added.
> +        * bmalloc.xcodeproj/project.pbxproj:
> +

Too many ChangeLog entries.

> Source/bmalloc/bmalloc.xcodeproj/project.pbxproj:366
> +				MACOSX_DEPLOYMENT_TARGET = 10.9;

This isn't right.

> Source/bmalloc/bmalloc.xcodeproj/project.pbxproj:367
> +				SDKROOT = macosx;

For our other projects we build them against the internal SDK when it's available, and the public ones otherwise.

> Source/bmalloc/bmalloc.xcodeproj/project.pbxproj:536
>  			defaultConfigurationName = Release;

I think the default configuration of all of these targets needs to be Production, or it won't do the right thing for our production builds.
Comment 6 Geoffrey Garen 2014-04-07 20:27:46 PDT
Created attachment 228797 [details]
Patch
Comment 7 Geoffrey Garen 2014-04-07 20:38:44 PDT
Created attachment 228798 [details]
Patch
Comment 8 Mark Rowe (bdash) 2014-04-07 21:22:01 PDT
Comment on attachment 228798 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=228798&action=review

It looks like you're missing the magic in the Xcode project itself that'll actually set the optimization level / debug defines to the right values between configurations:

                                DEAD_CODE_STRIPPING = "$(DEAD_CODE_STRIPPING_debug)";
                                DEBUG_DEFINES = "$(DEBUG_DEFINES_debug)";
                                GCC_OPTIMIZATION_LEVEL = "$(GCC_OPTIMIZATION_LEVEL_debug)";
                                STRIP_INSTALLED_PRODUCT = "$(STRIP_INSTALLED_PRODUCT_debug)";

Those should be set in the Debug configuration at the project level. Take a look at WTF's for comparison. Other than that, things look good!

> Source/bmalloc/Configurations/Base.xcconfig:88
> +HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include $(DSTROOT)/$(INSTALL_PATH_PREFIX)/usr/local/include icu $(HEADER_SEARCH_PATHS);

I suspect you don't need these header search paths.

> Source/bmalloc/Configurations/Base.xcconfig:94
> +JAVASCRIPTCORE_FRAMEWORKS_DIR = $(SYSTEM_LIBRARY_DIR)/Frameworks;

Or this.
Comment 9 Geoffrey Garen 2014-04-07 22:23:18 PDT
Created attachment 228804 [details]
Patch
Comment 10 Geoffrey Garen 2014-04-07 22:32:05 PDT
Committed r166910: <http://trac.webkit.org/changeset/166910>