Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ticat fp
GHC
Commits
9ca011cd
Commit
9ca011cd
authored
8 months ago
by
Sven Tennie
Browse files
Options
Downloads
Patches
Plain Diff
Host target needs to be LLVM adjusted
Same as for target target: LLVM does not support all triples.
parent
65dcae13
Branches
cherry-pick-43a43a33
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
m4/fp_prog_llvm_as_args.m4
+7
-3
7 additions, 3 deletions
m4/fp_prog_llvm_as_args.m4
m4/ghc_llvm_target.m4
+10
-0
10 additions, 0 deletions
m4/ghc_llvm_target.m4
with
17 additions
and
3 deletions
m4/fp_prog_llvm_as_args.m4
+
7
−
3
View file @
9ca011cd
...
...
@@ -4,10 +4,14 @@
# Sets the arguments of the LLVM assembler ($LLVMAS; usually clang.)
AC_DEFUN([FP_PROG_LLVM_AS_ARGS],
[
AC_REQUIRE([GHC_LLVM_TARGET_SET_VAR])
AC_REQUIRE([GHC_LLVM_HOST_TARGET_SET_VAR])
# Cross-compiling: We need to define the target triple for the LLVM assembler.
# Though, it does not hurt to define it for the non-cross case as well.
LlvmAsArgsTarget="--target=$TargetPlatform"
LlvmAsArgsHost="--target=$HostPlatform"
# Otherwise, LLVMAS tries to build for the host architecture. Defining the host
# target is not strictly necessary, but it usually helps to be specific about
# the build options.
LlvmAsArgsTarget="--target=$LlvmTarget"
LlvmAsArgsHost="--target=$LlvmHostTarget"
# Create a minimal LLVM IR file for testing
cat > test.ll <<EOF
...
...
This diff is collapsed.
Click to expand it.
m4/ghc_llvm_target.m4
+
10
−
0
View file @
9ca011cd
...
...
@@ -57,3 +57,13 @@ AC_DEFUN([GHC_LLVM_TARGET_SET_VAR], [
GHC_LLVM_TARGET([$target],[$target_cpu],[$target_vendor],[$target_os],[LlvmTarget])
fi
])
# GHC_LLVM_HOST_TARGET_SET_VAR
# -----------------------
#
# Sets the cannonical target variable of the host. This stub exists so other
# macros can require it.
AC_DEFUN([GHC_LLVM_HOST_TARGET_SET_VAR], [
AC_REQUIRE([FPTOOLS_SET_PLATFORMS_VARS])
GHC_LLVM_TARGET([$host],[$host_cpu],[$host_vendor],[$host_os],[LlvmHostTarget])
])
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment