Are you referring to the destruction of Sodom? It's hardly clear from the Bible whether or not homosexuality was the sin responsible for the destruction of the city. Or the part where Ham "sees the nakedness of his father"? Apart from those, I don't think there's any reference to homosexuality before Leviticus, and those two are very cryptic, and it would take quite a bit to view them as laws.
Marriage is established early in Genesis; the assumption is that the sexual prohibitions surrounding it came with it.