Commit f513a4c7 authored by aestes@apple.com's avatar aestes@apple.com

[iOS] Prepare for upstreaming DumpRenderTree changes

https://bugs.webkit.org/show_bug.cgi?id=127412

Reviewed by Simon Fraser.

Unlike on Mac where DumpRenderTree is a command-line tool, on iOS it is
an application bundle. Instead of upstreaming a separate target for the
app that duplicates the 'Compile Sources' phase of the tool, separate
out the compilation into a static library target that both the
command-line tool and the app can link against. Also, perform some
unrelated cleanup.

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Updated the
project file format from 2.4- to 3.2-compatible. Removed the
'Copy Headers' build phase and removed all files from the
'Compile Sources' build phase of DumpRenderTree. Added some files that
were missing from the project. Created a 'DumpRenderTree (Library)'
target for building the static library and made the 'DumpRenderTree'
target depend on it. Added a 'Compile Sources' build phase to this
target that builds the same files the DumpRenderTree target used to.
Created DumpRenderTreeMain.mm as the only source file of the
DumpRenderTree target, since targets won't link a binary without at
least one source file. Made DumpRenderTree (Library) use
DumpRenderTreeLibrary.xcconfig and made LayoutTestHelper use
BaseTarget.xcconfig (so that it doesn't try to link libDumpRenderTree.a).
* DumpRenderTree/mac/Configurations/BaseTarget.xcconfig: Moved
definitions of GCC_ENABLE_OBJC_EXCEPTIONS and GCC_PREFIX_HEADER from
DumpRenderTree.xcconfig to here so that LayoutTestHelper can use them.
* DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig: Passed
-force_load $(BUILT_PRODUCTS_DIR)libDumpRenderTree.a to OTHER_LDFLAGS.
This is needed to correctly link a static library containing an Objective-C
category (see <https://developer.apple.com/library/mac/qa/qa1490/_index.html>).
* DumpRenderTree/mac/Configurations/DumpRenderTreeLibrary.xcconfig: Added.
* DumpRenderTree/mac/DumpRenderTree.mm:
(DumpRenderTreeMain): Renamed from main.
* DumpRenderTree/mac/DumpRenderTreeMac.h: Added declaration of DumpRenderTreeMain.
* DumpRenderTree/mac/DumpRenderTreeMain.mm: Added.
(main): Called DumpRenderTreeMain from main.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4c4044de
2014-01-22 Andy Estes <aestes@apple.com>
[iOS] Prepare for upstreaming DumpRenderTree changes
https://bugs.webkit.org/show_bug.cgi?id=127412
Reviewed by Simon Fraser.
Unlike on Mac where DumpRenderTree is a command-line tool, on iOS it is
an application bundle. Instead of upstreaming a separate target for the
app that duplicates the 'Compile Sources' phase of the tool, separate
out the compilation into a static library target that both the
command-line tool and the app can link against. Also, perform some
unrelated cleanup.
* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Updated the
project file format from 2.4- to 3.2-compatible. Removed the
'Copy Headers' build phase and removed all files from the
'Compile Sources' build phase of DumpRenderTree. Added some files that
were missing from the project. Created a 'DumpRenderTree (Library)'
target for building the static library and made the 'DumpRenderTree'
target depend on it. Added a 'Compile Sources' build phase to this
target that builds the same files the DumpRenderTree target used to.
Created DumpRenderTreeMain.mm as the only source file of the
DumpRenderTree target, since targets won't link a binary without at
least one source file. Made DumpRenderTree (Library) use
DumpRenderTreeLibrary.xcconfig and made LayoutTestHelper use
BaseTarget.xcconfig (so that it doesn't try to link libDumpRenderTree.a).
* DumpRenderTree/mac/Configurations/BaseTarget.xcconfig: Moved
definitions of GCC_ENABLE_OBJC_EXCEPTIONS and GCC_PREFIX_HEADER from
DumpRenderTree.xcconfig to here so that LayoutTestHelper can use them.
* DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig: Passed
-force_load $(BUILT_PRODUCTS_DIR)libDumpRenderTree.a to OTHER_LDFLAGS.
This is needed to correctly link a static library containing an Objective-C
category (see <https://developer.apple.com/library/mac/qa/qa1490/_index.html>).
* DumpRenderTree/mac/Configurations/DumpRenderTreeLibrary.xcconfig: Added.
* DumpRenderTree/mac/DumpRenderTree.mm:
(DumpRenderTreeMain): Renamed from main.
* DumpRenderTree/mac/DumpRenderTreeMac.h: Added declaration of DumpRenderTreeMain.
* DumpRenderTree/mac/DumpRenderTreeMain.mm: Added.
(main): Called DumpRenderTreeMain from main.
2014-01-15 Martin Robinson <mrobinson@igalia.com>
[GTK][CMake] build-webkit should try harder to avoid re-running cmake
......
......@@ -23,3 +23,5 @@
OTHER_CFLAGS = $(inherited) -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Frameworks;
OTHER_CPLUSPLUSFLAGS = $(OTHER_CFLAGS);
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_PREFIX_HEADER = DumpRenderTreePrefix.h;
......@@ -23,8 +23,6 @@
#include "BaseTarget.xcconfig"
OTHER_LDFLAGS = $(inherited) -l$(WEBKIT_SYSTEM_INTERFACE_LIBRARY)
OTHER_LDFLAGS = $(inherited) -l$(WEBKIT_SYSTEM_INTERFACE_LIBRARY) -force_load $(BUILT_PRODUCTS_DIR)/libDumpRenderTree.a;
LD_RUNPATH_SEARCH_PATHS = "@loader_path/.";
PRODUCT_NAME = DumpRenderTree
GCC_ENABLE_OBJC_EXCEPTIONS = YES
GCC_PREFIX_HEADER = DumpRenderTreePrefix.h
PRODUCT_NAME = DumpRenderTree;
//
// Copyright (C) 2014 Apple Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
//
#include "BaseTarget.xcconfig"
PRODUCT_NAME = DumpRenderTree;
SKIP_INSTALL = YES;
......@@ -927,7 +927,7 @@ void dumpRenderTree(int argc, const char *argv[])
}
}
int main(int argc, const char *argv[])
int DumpRenderTreeMain(int argc, const char *argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
......
......@@ -69,4 +69,6 @@ void setPersistentUserStyleSheetLocation(CFStringRef);
unsigned worldIDForWorld(WebScriptWorld *);
int DumpRenderTreeMain(int, const char *[]);
#endif // DumpRenderTreeMac_h
/*
* Copyright (C) 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "DumpRenderTreeMac.h"
int main(int argc, const char *argv[])
{
return DumpRenderTreeMain(argc, argv);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment